TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos...
Transcript of TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos...
![Page 1: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/1.jpg)
Lightning talks
TIRANA | Sept. 28th, 2018
![Page 2: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/2.jpg)
Speakers
● Lázsló: LibreOffice and eTwinning● Caolan: oss-fuzz, crash testing & coverity● Muhammet: Customize dialog news● Thorsten: Why is doing dev metrics hard● Moggi: UI testing in LibreOffice● Guilhem: the status.documentfoundation.org website● Cathy: documentation & LibreOffice● Gabor: a brief look at chart bugfixing● Armin: system-dependent data buffering● Gabriele: TBD● Franklin: What "Designing with LibreOffice" taught me● Mark: Vertical Ruby Support in LibreOffice● Miklos: vcl layout speedup
![Page 3: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/3.jpg)
Coverity, Crashtesting and Fuzzing
• Coverity Stats
• Crashtesting Stats
• OSS-Fuzz Stats
![Page 4: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/4.jpg)
Coverity Stats 2017
![Page 5: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/5.jpg)
Coverity Stats 2018
![Page 6: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/6.jpg)
Coverity Stats 2017
C++11Exceptions
![Page 7: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/7.jpg)
Coverity Stats 2018C++17Syntax
![Page 8: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/8.jpg)
CrashTesting
• 108480 (up from 98531) documents
![Page 9: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/9.jpg)
CrashTesting Import
Slide BgSidebar
useuniqueptr
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 490
100
200
300
400
500
600
builds
failu
res
![Page 10: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/10.jpg)
CrashTesting Export
Watermark
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 500
20
40
60
80
100
120
140
160
180
200
builds
failu
res
Pesky block,Webdav ?
![Page 11: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/11.jpg)
INSERT DESIGNATOR, IF NEEDED
11
Google OSS-Fuzz
![Page 12: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/12.jpg)
Our current status
• libfuzzer+asan, libfuzzer+ubsan, and afl+asan• Just libfuzzer+asan last year
• 45 fuzzer (up from 34 fuzzers)
![Page 13: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/13.jpg)
A year of oss-fuzz
Sep, 2017Oct, 2017Nov, 2017Dec, 2017Jan, 2018Feb, 2018Mar, 2018 Apr, 2018May, 2018Jun, 2018 Jul, 2018 Aug, 2018Sep, 20180
20
40
60
80
100
120
140
by month
issu
es
719 bugs, of which 149 serious
![Page 14: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/14.jpg)
End
![Page 16: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/16.jpg)
Agenda
• Goals• Current State• Since Last Year• What’s Left
![Page 17: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/17.jpg)
Goals
● Modernize to…– ...make it more usable– ...make it fully accessible– ...make it intuitive– ...eliminate bugs
![Page 18: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/18.jpg)
Current State
● Finished tabs:– Menus– Toolbars– Context Menus
● Search feature in the keyboard tab● Some annoying bugs fixed
![Page 19: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/19.jpg)
![Page 20: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/20.jpg)
Since Last Year
● Some fixed bugs & added features– tdf#108916: uno:LanguageStatus shouldn't appear in the customize dialog– tdf#112207: Allow assigning styles to ui elements– tdf#112207: Allow assigning macros to ui elements– tdf#114260: Add gear button to Customize dialog– tdf#114260: Allow moving top-level menus– tdf#115511: Make the description field keyboard-accessible– tdf#116494: Don't ask parent if no help text– tdf#114260: Allow setting toolbar style in the gear menu– tdf#112323: Sort the category list alphabetically in the Customize dialog– Add UI test for the Customize dialog
![Page 21: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/21.jpg)
TODO
● Revamp the remaining tabs– Keyboard– Events
● Fix existing bugs on the meta bug● Tdf#103238 – Customize Dialog Meta Bug
![Page 22: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/22.jpg)
All text and image content in this document is licensed under the Creative Commons Attribution-Share Alike 4.0 License (unless otherwise specified). “LibreOffice” and “The Document Foundation” are registered trademarks. Their respective logos and icons are subject to international copyright laws. The use of these thereof is subject to trademark policy.
Thank you!
![Page 23: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/23.jpg)
23
WHY IS DOING SOFTWARE DEVELOPMENT METRICS HARD?
THORSTEN BEHRENSLIBREOFFICE CONFERENCE TIRANA
![Page 24: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/24.jpg)
Programmer Wisdom
When you can measure what you are speaking about, and express it in numbers, you know something about it, when you cannot express it in numbers, your knowledge is of a meager and unsatisfactory kind; it may be the beginning of knowledge, but you have scarely, in your thoughts advanced to the stage of science
“”
Lord Kelvin
![Page 25: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/25.jpg)
Programmer Wisdom
In truth, a good case could be made that if your knowledge is meagre and unsatisfactory, the last thing in the world you should do is to make measurements. The chance is negligible that you will measure the right thing accidentally.
“”
George Miller
![Page 26: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/26.jpg)
Some advice (from others)
● Track meaningful work
● Track trends, not numbers
● Use metrics that lead to positive change
– Avoid code churn
– MTBF, MTTR
– Award good behaviour: bugfixing, mentoring, reviews
![Page 27: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/27.jpg)
Agenda
Markus Mohrhard
UI testing in LibreOffice
UI testing in LibreOffice
![Page 28: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/28.jpg)
28LibreOffice Presentation Template (Community)
UI testing in LibreOffice
Markus Mohrhard2018-09-28
![Page 29: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/29.jpg)
LibreOffice Presentation Template (Community)
29
● make uicheck
● Can execute single test manually
● https://cgit.freedesktop.org/libreoffice/contrib/dev-tools/tree/uitest/execute.sh
● https://wiki.documentfoundation.org/Development/UITests
![Page 30: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/30.jpg)
LibreOffice Presentation Template (Community)
30
Logging and replaying
● Set LO_COLLECT_UIINFO=test.log
● Log file generated under instdir/uitest/test.log
● uitest/loginterpreter.py instdir/uitest/test.log simple_test.py
● Work by Saurav Chirania as part of GSoC
![Page 31: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/31.jpg)
31LibreOffice Presentation Template (Community)
All text and image content in this document is licensed under the Creative Commons Attribution-Share Alike 3.0 License (unless otherwise specified). "LibreOffice" and "The Document Foundation" are registered trademarks. Their respective logos and icons are subject to international copyright laws. The use of these therefore is subject to the trademark policy.
Thank you …
… for listening!
![Page 32: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/32.jpg)
Agenda
Guilhem Moulin: https://status.documentfoundation.org
UI testing in LibreOffice
![Page 33: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/33.jpg)
Agenda
Cathy CrumbleyDocumentation & LibreOffice
UI testing in LibreOffice
![Page 34: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/34.jpg)
34
LibreOffice bug fixingin ooxml import/export of charts
Ádám Kovács and Balázs VargaJunior developersNISZ Inc.
![Page 35: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/35.jpg)
35tdf#108064: BEFORE the bugfix have done
the original file after saving the file with LO to docx, xlsx
![Page 36: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/36.jpg)
36tdf#108064: AFTER the bugfix have done
the original file after saving the file with LO to docx, xlsx
![Page 37: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/37.jpg)
37
tdf#108064
The point was copy-pasting the getLineDash function:
...from the file ChartLinePanel.cxx to drawingml.cxx
![Page 38: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/38.jpg)
38
tdf#108064
Calling mAny.get<drawing::LineDash>(); was not succesful in the case of charts, so if the result has 0 values, we call the „new” getLineDash(...) function:
And its result overwrites the former value of aLineDash variable.
![Page 39: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/39.jpg)
39
tdf#108064
Of course, in order to make this working, we need to modify some header files and the parameters of the function:drawingml.cxx, WriteOutLine function (where we call the „new” getLineDash function):
drawingml.hxx:
chartexport.cxx (where we call WriteOutLine function):
![Page 40: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/40.jpg)
40
tdf#108064
Of course, this fix is not perfect. We still have to work about the LO preset linestyles:
before ooxml export in LO
after ooxml export in LO
LO
MSO
![Page 41: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/41.jpg)
41tdf#108028 Fix line breaking of chart title (before the fix)
• LibreOffice previously distorted the text and squeezed the chart, because the textbox of chart legend could not automaticlly wrap the text..
![Page 42: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/42.jpg)
42tdf#108028 Fix line breaking of chart title (after the fix)
• With the fix LibreOffice automatically wrap the text in the chart title textbox
![Page 43: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/43.jpg)
43Tdf#96469 OOXML Export Data Point properties in Charts
• If the color or other property of a datapoint in the chart deviates from the dataseries property, a separate dPt tag will be written into the XML and fixing the lost properies during OOXML export.
![Page 44: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/44.jpg)
44Tdf#94502 OOXML Fix/Workaround overlap export of Stacked Column/Bar Chart
• Export the Overlap value with 100% for stacked charts, because the default overlap value of the Bar/Column chart is 0% and LibreOffice do nothing with the overlap value in Stacked Chart case, unlike the MS Office.
![Page 45: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/45.jpg)
45OOXML Export Chart shapes fill properties and some other bugs in one chart before a few fixes
• Just to represent how a Column charts looked like in LibreOffice 6.0.4 around july after an OOXML export.
• There were problems with simple color gradient, bitmap at Chart Legend, Plot Area, Dataseries and Background
![Page 46: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/46.jpg)
46OOXML Export Chart shapes fill properties and some other bugs in one chart after a few fixes
Just to represent how a Column charts looks like in LibreOffice 6.2 these days after an OOXML export.
![Page 47: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/47.jpg)
47
Thanks for the guidance from László Németh,and the attention from our viewers
![Page 48: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/48.jpg)
48
CIB SOFTWARE GMBHTIRANA, FRIDAY 27. SEPTEMBER 2018
ARMIN LE GRAND
LIGHTNING TALKSYSTEM-DEPENDENT DATA BUFFERING
![Page 49: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/49.jpg)
49
SYSTEM-DEPENDENT DATA BUFFERING> Transformation-invariant Instance of Data needed (translate/scale)
> OutputDevice to SAL-calls extended to use B2DHomMatrix as
ObjectToViewTransform (old trasfomed to DeviceCoordinates)
> SystemDependentData (only known in sys-dep files/paths/Validity)– SystemDependentData_CairoPath (Cairo/Line)– SystemDependentData_GraphicsPath (Win/Line/Fill)– SystemDependentData_GdiPlusBitmap– SystemDependentData_Triangulation (X11 Line/Direct Triangulation, no
Trapezoids anymore)
> SystemDependentDataManager (Global Instance/Mutex, std::shared_ptr)– ImplSVData::SystemDependentDataBuffer– size/time aspect buffering
> SystemDependentDataHolder (std::weak_ptr)– ImplBufferedData → B2DPolygon, B2DPolyPolygon– WinSalBitmap
> Uses typeid(T).hash_code() RTTI to identify
![Page 50: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/50.jpg)
WhatDesigning with LibreOfficeTaught Me
Franklin WengTIRANA | 28 Sept. 2018
![Page 51: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/51.jpg)
Designing With LibreOffice, by Bruce Byfield, 2016Has anyone ever deeply read this book?
![Page 52: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/52.jpg)
Main Translator of Traditional Chinese version:
*Also thanks to: Mark Hung, Bo-Ren Lin and Wei-Lun Chao
Cheng-Chia Tseng Jeff Huang Franklin Weng
![Page 53: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/53.jpg)
WhatDesigning With LibreOffice
Taught Me
![Page 54: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/54.jpg)
1. Use style instead of manually adjusting formats
Is that a common sense?Apparently not.
![Page 55: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/55.jpg)
![Page 56: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/56.jpg)
2. Create your own templateswith styles you frequently use.
Is that a common sense?Never.
![Page 57: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/57.jpg)
3. Making images fixed in Writeris quite upsetting.
It's true when I merged every chapter of this book together...
![Page 58: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/58.jpg)
4. Good and correct cross reference is really interesting and amazing.
![Page 59: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/59.jpg)
Before merging...
![Page 60: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/60.jpg)
After merging...
I don't need to do any additional setting!
![Page 61: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/61.jpg)
5. Don't generate TOC like this
The result is ugly. It is also clumsy.– Bruce Byfield,
Designing With LibreOffice, 2016
Unfortunately...
![Page 62: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/62.jpg)
6. Don't use slides in speeches.
Hey, what am I doing?
![Page 63: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/63.jpg)
If you really want to use slides
● Don't generate your slides this way.● Summary slides can be useful only under one
condition:– When these is no audience.
![Page 64: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/64.jpg)
Anyway, we made it.
After translating and merging every chapter together, I'm feeling like an expert of typography.
![Page 65: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/65.jpg)
All text and image content in this document is licensed under the Creative Commons Attribution-Share Alike 4.0 License (unless otherwise specified). “LibreOffice” and “The Document Foundation” are registered trademarks. Their respective logos and icons are subject to international copyright laws. The use of these thereof is subject to trademark policy.
Highly recommend you to deeply read it!
*And learn Chinese at the same time
![Page 66: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/66.jpg)
Vertical Ruby Support in LibreOfficeMark [email protected] |28 Sept. 2018
![Page 67: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/67.jpg)
“Ruby” aka Asian Phonetic Guide
● Is a way to mark CJK ideographs so that people know how to read them.
● For children in Taiwan.● Essential for Japanese names.
![Page 68: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/68.jpg)
Vertical Ruby● LibreOffice supports ruby over or below the
base text since beginning.● Marking on the right vertically is used in
Taiwan. Top or bottom is rare.
Base Text
Ruby
ToneBase Text
Ruby
Tone Base Text
Ruby
Tone
![Page 69: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/69.jpg)
Challenge: SwMultiPortion
● Fear of breaking BIDIsupport
Base TextR
uby
Tone
![Page 70: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/70.jpg)
Features ready in LibreOffice 6.1
● Text layout.● New option for ruby position in the ruby
dialog.● ODF import / export with loext:ruby-position.● DOCX import / export ready.
loext:ruby-position.
![Page 71: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/71.jpg)
All text and image content in this document is licensed under the Creative Commons Attribution-Share Alike 4.0 License (unless otherwise specified). “LibreOffice” and “The Document Foundation” are registered trademarks. Their respective logos and icons are subject to international copyright laws. The use of these thereof is subject to trademark policy.
Thanks for Listening
![Page 72: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/72.jpg)
Collabora Productivity www.collaboraoffice.com
Collabora Productivity
Text layout performance
By Miklos VajnaSoftware Engineer at Collabora Productivity2018-09-28
![Page 73: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/73.jpg)
Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77
Motivation
Quoting the TDF wiki:
● All over the code base assumes shaping text is cheap
● We can do it over and over again
● Want to measure the text? Shape it and discard the output afterwards. Want to measure part of the same text? Shape again. Want to find line breaks? Shape again. Want to finally draw it? Shape again.
● In contrast, other toolkits typically calculate the layout explicitly:
● e.g. GtkLabel has an explicit PangoLayout, etc.
![Page 74: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/74.jpg)
Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 74 / 77
Work done: shared code
vcl
● StatusBar (thanks to Tamás Bunth)
● ListBox
● Menu
svtools
● Ruler
Not a cache: just lazy-calculate the layout
![Page 75: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/75.jpg)
Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 75 / 77
Work done: Writer
Good news
● Everything goes through SwFntObj
● Can cache GetTextArray(), DrawTextArray(), GetTextWidth(), GetTextBreak() calls on OutputDevice
Bad news
● Need a cache: SwFntObj typically doesn’t have a good idea about the
lifecycle of the created text layout
● For now: SwTextGlyphsKey stores which subset of which text was laid out
on which output device
● Storing the full output device state is too expensive
● Can’t handle everything transparently in VCL
![Page 76: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/76.jpg)
Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 76 / 77
Results
Metric: # of layout calls
● GenericSalLayout::LayoutText()
Measured: one Writer scenario (equivalent of UITests in sw)
● 55793 layout callsinitially
● 18126 layout callsnow
● Only 32% of theoriginal work isperformed
baseline sw draw cache ruler cache sw break cache listbox cache0
10000
20000
30000
40000
50000
60000
# of layouts
![Page 77: TIRANA | Sept. 28th, 2018 · Collabora Productivity LibreOffice Conference 2019, Tirana | Miklos Vajna 73 / 77 Motivation Quoting the TDF wiki: All over the code base assumes shaping](https://reader035.fdocuments.in/reader035/viewer/2022070108/6041d527d8a15514e074e19c/html5/thumbnails/77.jpg)
All text and image content in this document is licensed under the Creative Commons Attribution-Share Alike 4.0 License (unless otherwise specified). “LibreOffice” and “The Document Foundation” are registered trademarks. Their respective logos and icons are subject to international copyright laws. The use of these thereof is subject to trademark policy.
Thanks indeed!