848
I Use This!
Activity Not Available

News

Analyzed 4 months ago. based on code collected 5 months ago.
Posted about 2 years ago by Hossein Nourikhah
There are many places in the code that calculating the Pythagorean addition is needed, which is defined as: a ⊕ b = sqrt(a^2+b^2) This is hypotenuse, or the length of the longest side of a right-angled triangle, that we know the other 2 sides, a and ... [More] b. For a more detailed description, see this: Wikipedia – Pythagorean addition Theoretically, this calculation could be done using sqrt(a * a + b * b), but there are problems with this approach. For large a or b, there is a possibility of overflow, although the result itself is not that big to cause overflow. To overcome this problem, there are implementations of hypotenuse that do not use power of 2, and use other methods to calculate the result. One of them which is usable in C++ is the std::hypot. To calculate a ⊕ b, you can easily use std::hypot(a,b). For the description of this function, see this page: Cpp Reference – std::hypot As an example, you can see this commit from Mike: @@ -3943,8 +3943,6 @@ void HwpReader::makePicture(Picture * hbox) } } - namespace { double DBL(int x) { return x * x; } } - void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox) { int x = hbox->pgx; @@ -4047,8 +4045,8 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox) bIsRotate = true; } if( bIsRotate ){ - drawobj->extent.w = static_cast [Less]
Posted about 2 years ago by Mike Saunders
Berlin, March 10, 2021 – LibreOffice 7.2.6 Community, the sixth minor release of the LibreOffice 7.2 family, targeted at desktop productivity, is available from from the download page. End user support is provided by volunteers via email and online ... [More] resources: community support. On the website and the wiki there are guides, manuals, tutorials and HowTos. […] [Less]
Posted about 2 years ago by x1sc0
General Activities LibreOffice 7.3 was released on February 2 FOSDEM took place February 5-6. Watch all the talks here Alain Romedenne added a help page for CallByName Basic function and improved other Basic pages Stanislav Horáček and Adolfo Jayme ... [More] Barrientos made some Help cleanups Rafael Lima and flywire improved the ScriptForge library help pages. Rafael also made the Manage changes sidebar panel non-experimental, created a command for duplicating sheets in Calc and fixed Search Commands deleting selected text instead of applying a command Seth Chaiklin improved the help page for Template Manager Olivier Hallot (TDF) added help pages for Calc’s Recalculate Hard and Formula to value and improved Help for indentation and some Calc functions Renwa Hiwa and zhutyra fixed several security issues Ilmari Lauhakangas (TDF) fixed an issue with the UI logger Justin Luth (SIL) fixed some issues with Calc’s spelling context menu, Calc’s autofill and hidden/filtered cells, made Draw/Impress Find and replace more robust, made it so setting a border style in Writer adds borders, if there are none, fixed an issue with table layout when re-saving a DOC file and made Writer ruler tabstops respect spacing to contents in tables and frames. He also fixed many regressions Tomaž Vajngerl (Collabora) improved VBA macro compatibility and improved the display of long labels in charts. He is also working on supporting sparklines in Calc Dennis Francis (Collabora) worked on RTL support for LOKit Gülşah Köse (Collabora) fixed issues with table borders in imported PPTX files Noel Grandin (Collabora) made bitmap rotation faster and improved the loading speed of large charts. He also made many code cleanups Caolán McNamara (Red Hat) fixed issues with seeking and stopping in the media player. He also fixed some crashes and many UI issues and continued working on the new gtk4 UI backend Stephan Bergmann (Red Hat) fixed an issue with certain Unicode characters resulting in corrupted XLSX files, raised Linux Clang compiler baseline to 8.0.1 and macOS build baseline to Xcode 12.5 and macOS 11.0. He also made many code and build-related cleanups as well as test fixes Szymon Kłos and Henry Castro (Collabora) worked on LOKit improvements Michael Warner fixed Title Case formating occuring outside of a selection Luboš Luňák (Collabora) improved the speed of Calc’s VLOOKUP function, fixed the orientation combobox in the print dialog, polished the handling of 1024+ columns in Calc and made many improvements to Calc’s document loading and general performance Jens Carl converted a Java test to C++ Hossein Nourikhah (TDF) made some cleanups and wrote blog posts about development https://dev.blog.documentfoundation.org/2022/02/10/working-with-libreoffice-sdk-examples/ https://dev.blog.documentfoundation.org/2022/02/23/adding-a-new-uno-command/ Michael Meeks (Collabora) patched Boost library to improve handling of encodings Marco Cecchetti (Collabora) made exported SVGs work better with Chrome browser Gábor Kelemen (allotropia) made many code cleanups Sarper Akdemir (Collabora) fixed incorrect shapes in slide footers in imported PPTX files and textboxes with newlines not preserving text size in exported PPTX files Jan-Marek Glogowski (allotropia) continued working on the WebAssembly port Christian Lohmaier (TDF) simplified some makefiles Samuel Mehrbrodt (allotropia) fixed an issue with copying Calc ranges and created an extension to test the crashreporter setup Michael Weghorn made many internal improvements to the Linux and Windows accessibility code Vasily Melenchuk (CIB) fixed header/footer missing with DOCX export and margin not respected for lists with DOCX import Eike Rathke (Red Hat) fixed pasting merged HTML table content into Calc and fixed an old annoyance, where copying and pasting a single cell from Calc to another application would append a newline Kevin Suo improved the handling of font names and weights in PDF import and made Chinese and Japanese text use separate numbering styles Andreas Heinisch fixed some Calc issues and made Calc’s .uno:EnterString handle embedded newlines Rizal Muttaqin made many updates to all the icon themes Tünde Tóth (NISZ) fixed PPTX import issues concerning image-filled shapes and font colour. He also fixed DOCX export of hatch fill Tor Lillqvist (Collabora) made PDFs inserted as images sharper on macOS Heiko Tietze (TDF) added an environment to skip showing save document dialog to help bug triagers. He also made many UI improvements Attila Bakos (NISZ) continued polishing text in grouped shapes Tibor Nagy (NISZ) fixed an issue with shape fill attributes in PPTX export Armin Le Grand (allotropia) started working on Advanced Diagram support Regina Henschel fixed unwanted frame borders in RTF export and improved lighting in extruded custom shapes Jim Raykowski improved handling comments in the Navigator and made many internal improvements to Navigator code Michael Stahl (allotropia) added a flat ODF cleanup script to help developers and fixed several Writer regressions Julien Nabet continued improving database code, fixed a crash and made cleanups Xisco Faulí (TDF) made over fifty improvements and additions to automated tests Mike Kaganski (Collabora) improved the performance of Calc’s SUBSTITUTE function, added Dragonbox library for converting doubles to strings in an optimal way, optimised the internal string replacing code and made many cleanups Miklos Vajna (Collabora) added further capabilities for exporting PDFs from the command line, added a way to preserve tab-based indentation in HTML export, continued working on colour themes in OOXML documents and made many cleanups. He also improved Word-style borders around pages, tables and paragaphs Jean-Pierre Ledure worked on the ScriptForge library László Németh continued improving change tracking of tables Kudos to Ilmari Lauhakangas for helping to elaborate this list. Reported Bugs 599 bugs, 73 of which are enhancements, have been reported by 382 people. Top 10 Reporters Telesto ( 44 ) Mike Kaganski ( 15 ) NISZ LibreOffice Team ( 11 ) Anduril ( 11 ) Rafael Lima ( 10 ) Gabor Kelemen (allotropia) ( 9 ) Robert Großkopf ( 7 ) DErik ( 7 ) Rizal Muttaqin ( 6 ) Gerald Pfeifer ( 6 ) Triaged Bugs 596 bugs have been triaged by 89 people. Top 10 Triagers Dieter ( 74 ) Buovjaga ( 51 ) raal ( 47 ) eisa01 ( 42 ) Xisco Faulí ( 39 ) m.a.riosv ( 34 ) Heiko Tietze ( 32 ) Timur ( 32 ) Julien Nabet ( 26 ) Mike Kaganski ( 21 ) Resolution of resolved bugs 618 bugs have been set to RESOLVED. Check the following sections for more information about bugs resolved as FIXED, WORKSFORME and DUPLICATE. Fixed Bugs 204 bugs have been fixed by 37 people. Top 10 Fixers Caolán McNamara ( 15 ) Justin Luth ( 14 ) Luboš Luňák ( 12 ) Eike Rathke ( 8 ) Rizal Muttaqin ( 8 ) Heiko Tietze ( 7 ) Julien Nabet ( 7 ) László Németh ( 7 ) Tünde Tóth ( 6 ) Michael Stahl ( 6 ) List of critical bugs fixed tdf#145963 Slow typing with version 7.1 or above on Windows 11 ( Thanks to Luboš Luňák ) List of high severity bugs fixed tdf#137920 Writer hung when inserting image larger than page ( Thanks to Miklos Vajna ) tdf#146462 Field Dialog: Not able to insert cross reference any more: the Insert > Cross Reference dialog shows no Table or Figure entries ( Thanks to Michael Stahl ) tdf#146597 Writer stops responding when a group of shapes is anchored to character ( Thanks to Attila Bakos (NISZ) ) tdf#146795 Calc crashes when pasting data into filtered cells (mdds) ( Thanks to Kohei Yoshida ) tdf#147298 Auto Calculate does not work on newly inserted columns in ods or xls formats ( Thanks to Kohei Yoshida ) tdf#147398 In Calc ver 7.3.0.3. =Sum covering a range of cells fails to adjust when additional values are added within the range ( Thanks to Eike Rathke ) tdf#147448 Freezes because of External link ( Thanks to Eike Rathke ) List of crashes fixed tdf#135332 Crash: Scroll sidebar on Data Provider, which was opened by TAB UI ( Thanks to Luboš Luňák ) tdf#146622 Crash swlo!SwNodeIndex::SwNodeIndex+0x83: ( Thanks to László Németh ) tdf#146795 Calc crashes when pasting data into filtered cells (mdds) ( Thanks to Kohei Yoshida ) tdf#147006 CRASH: deleting content ( Thanks to Michael Stahl ) tdf#147008 CRASH: Inserting page break or newline ( Thanks to Michael Stahl ) tdf#147144 Writer crash after adding rectangle, add link and delete it ( Thanks to Julien Nabet ) tdf#147364 CRASH calling a DLL function returning a string in LibreOffice x64 on Windows ( Thanks to Mike Kaganski ) tdf#147394 Chart – Delete Legend: crash ( Thanks to Noel Grandin ) tdf#147451 Crash when click hyperlink to file ( Thanks to Luboš Luňák ) List of performance issues fixed tdf#119083 Recalculation is slow with 90000 VLOOKUP ( Thanks to Luboš Luňák ) tdf#133749 Slow saving with “support for large sheets enabled” compared to normal ( Thanks to Luboš Luňák ) tdf#137571 Adding and modifying animations painfully slow ( Thanks to Caolán McNamara ) tdf#140893 XLSX: save is slow for sheet that has value in row 1048576 ( Thanks to Luboš Luňák ) tdf#144380 Experimental Features – Forever loop for Deleting all columns ( Thanks to Luboš Luňák ) tdf#145963 Slow typing with version 7.1 or above on Windows 11 ( Thanks to Luboš Luňák ) tdf#147109 Calc SUBSTITUTE function slows down disproportionately as text length increases. ( Thanks to Mike Kaganski ) tdf#147421 LibreOffice hangs if there are massively null-byte characters in csv file ( Thanks to Mike Kaganski ) tdf#81765 FILEOPEN: slow loading in minutes of .ods and .xlsx with >1000 of conditional formats, also dump ( Thanks to Luboš Luňák ) List of old bugs ( more than 4 years old ) fixed tdf#101179 Writer/Web: View > HTML Source mode toggles are awkward ( Thanks to Heiko Tietze ) tdf#103800 FILEOPEN PPTX: Dark red font opens as white in specific text box ( Thanks to Tünde Tóth ) tdf#104902 unable to display chr(10) or chr(13) in a cell in calc when inserted by a macro ( Thanks to Andreas Heinisch ) tdf#111733 Sidebar character spacing popup has wrong selection ( Thanks to Justin Luth ) tdf#112209 Opening PPTX with images behind masks shows these images incorrectly ( Thanks to Tünde Tóth ) tdf#113191 Add 21 and 42 in size list for CJK due to the typographic scale convention ( Thanks to Julien Nabet ) tdf#113785 On filtered list an autofill upwards erases data (steps in Comment 3) ( Thanks to Justin Luth ) tdf#34759 media player pauses when press progressbar (rewind music) ( Thanks to Caolán McNamara ) tdf#74577 Pasting a HTML table into Libreoffice Calc can jumble the table up. ( Thanks to Eike Rathke ) tdf#77803 Implement separate numbering styles for Chinese and Japanese (they’re similar, but not the same) ( Thanks to Kevin Suo ) tdf#79186 Re-saving DOC with table running over page end breaks layout (table header on 1st page; vertically aligned text influences cells on 2nd page; remainder on 3rd page) ( Thanks to Justin Luth ) tdf#81765 FILEOPEN: slow loading in minutes of .ods and .xlsx with >1000 of conditional formats, also dump ( Thanks to Luboš Luňák ) tdf#81894 No suggestion in the spelling contextual menu for auto-wrapped portion of the text ( Thanks to Justin Luth ) tdf#92960 Calc doesn’t merge cells correctly when pasting merged content from HTML ( Thanks to Eike Rathke ) tdf#95882 UI: Ruler tabstops don’t account for spacing to contents in table/frame ( Thanks to Justin Luth ) WORKSFORME bugs 82 bugs have been retested by 35 people. Top 10 testers Buovjaga ( 14 ) Dieter ( 7 ) eisa01 ( 6 ) Julien Nabet ( 6 ) Jean-Baptiste Faure ( 5 ) Justin L ( 4 ) Telesto ( 3 ) Roman Kuznetsov ( 3 ) raal ( 3 ) Robert Großkopf ( 2 ) DUPLICATED bugs 146 bugs have been duplicated by 34 people. Top 10 testers Timur ( 20 ) Buovjaga ( 14 ) Xisco Faulí ( 13 ) Gabor Kelemen (allotropia) ( 10 ) Heiko Tietze ( 9 ) Dieter ( 9 ) Justin L ( 8 ) eisa01 ( 7 ) m.a.riosv ( 6 ) Lubos Lunak ( 5 ) Verified bug fixes 41 bugs have been verified by 15 people. Top 10 Verifiers… [Less]
Posted about 2 years ago by llunak
Posted about 2 years ago by Miklos Vajna
Writer now has a set of improvements to better render Word-style borders around pages, tables and paragaphs. This required adjusting how we perform automatic mirroring and also to make sure that clipping is done the Word way. First, thanks Docmosis ... [More] and TUBITAK who made this work by Collabora possible. Motivation Word users expect to able to import their documents to Writer and experience high fidelity rendering: this means Writer has to support the way page / table / paragraph borders are painted according to the OOXML model as well. This is all done conditionally, so existing ODF documents are left unchanged. This is a set of 5 bugfixes, requested by multiple of our customers. Results First let’s look at the new render result for page borders: Figure 1. Word-style page borders, new result And this is how it used to look like: Figure 2. Word-style page borders, old result Finally you can compare that with the reference: Figure 3. Word-style page borders, reference What you can see here is that the page has a double border: the outer line is thick and the inner line is thin. The right and bottom border was incorrect as our result was the opposite of the reference. Second, let’s look at the new render result for table borders: Figure 4. Word-style table borders, new result And this is how it used to look like: Figure 5. Word-style table borders, old result Finally you can compare that with the reference: Figure 6. Word-style table borders, reference You can notice a number of problems here: the inner horizontal line at the top table was overrunning, it was even painted between the two lines of the outer double border the middle table shows how the vertical thick and thin lines of the outer double border was reversed the bottom table shows how the horizontal tick inner border was not consistent The new render result properly clips the inner border lines, so they don’t intersect outer borders, and the border mirroring (similar to the page borders) is now correct for table borders as well. Third, let’s look at the new render result for paragraph borders: Figure 7. Word-style paragraph borders, new result And this is how it used to look like: Figure 8. Word-style paragraph borders, old result Finally you can compare that with the reference: Figure 9. Word-style paragraph borders, reference What’s visible here is that some paragraph inside the table cell had borders defined, but due to how the reference clips these borders, this border was not visible. That unexpected border is now also omitted in Writer. How is this implemented? If you would like to know a bit more about how this works, continue reading… :-) As usual, the high-level problem was addressed by a series of bugfix changes. For the page border: https://gerrit.libreoffice.org/c/core/+/129281 sw: fix swapped inner vs outer border for Word-style right/bottom page borders For the table border: https://gerrit.libreoffice.org/c/core/+/128053 sw: fix too long inner borders intersecting with outer borders for Word cells https://gerrit.libreoffice.org/c/core/+/128289 sw: fix swapped inner vs outer border for Word-style left table borders https://gerrit.libreoffice.org/c/core/+/128383 sw: fix swapped inner vs outer border for Word-style bottom table borders For the paragraph border: https://gerrit.libreoffice.org/c/core/+/128569 sw: fix unexpected paragraph border inside table cells Want to start using this? You can get a snapshot / demo of Collabora Office and try it out yourself right now: try unstable snapshot. Collabora intends to continue supporting and contributing to LibreOffice, the code is merged so we expect all of this work will be available in TDF’s next release too (7.4). [Less]
Posted about 2 years ago by Hossein Nourikhah
Because for loops are a powerful tool in C/C++, they are one of the desirable tools when you want to do something repeatedly, or process elements of a data structures. But there many ways to write a for loop. Some forms of it are easier to use, read ... [More] , write and understand, and some are not. Range based for loops are discussed in this article. They can be good if you know where to use them. Range Based For Loops Since C++11, range based for loops are available to iterate over a known range of values. For example, when there is a need to process elements of a container, range based loops are usually a good choice. They are easy to write, read and understand. The simplest form is as below, but be warned that it is not usually good: for(auto variable : range) statement; In this way, a temporary variable is created to iterate over the range of values. But this is usually undesirable, because the a copy of the variable is created each time. When you need to modify the values of the elements, you should use a reference: for(auto &variable : range) statement; This is also useful for working on big elements, as it can speed up the code by avoiding unneeded copying. Const Reference If modifying the elements is not needed, it is possible to use the reference, but use const to prevent modification of the referenced object. This is an example: for(auto const &element : range) statement; This is usually called east const. The latter is semantically equivalence, but is called west const: for(const auto &element : range) statement; The reference element itself can not be changed, and that is also true for references to non-pointer objects. There are other variants that are discussed in Auto Type Deduction in Range-Based For Loops. Declaring Variable Type You can use auto to let C++ compiler decide the suitable type for the loop variable, but you can also declare the variable type explicitly instead of using auto. Both of them are acceptable. For a good example, see this commit from Michael Weghorn: Sequence pStates = pRState->getStates(); int count = pStates.getLength(); for( int iIndex = 0;iIndex < count;iIndex++ ) { if (pStates[iIndex] == AccessibleStateType::MANAGES_DESCENDANTS) return true; } is converted into this range based for loop: for (sal_Int16 nState : pRState->getStates()) { if (nState == AccessibleStateType::MANAGES_DESCENDANTS) return true; } Limitations of Range Based For Loops Range based loops can simplify the code, but there are limitations for them. For example, if there is a need not to skip certain values, you will need std::ranges::views::drop which is available in C++20. Thus, they are not suitable for replacing every normal for loop. For an init statement in the range based for loop, you will also need C++20. Final Notes EasyHacks are a good start for newcomers. This specific improvement is filed as tdf#145538. You can find some possible candidates for changing to range based for loops with these commands: $ git grep -w for *.cxx | grep -iF "size()" $ git grep -w for *.cxx | grep -iF "length()" Good candidates can be found among the results. If you want to contribute to LibreOffice code by working on this improvement, but you need to know how to get started with LibreOffice development, I suggest you to see our video tutorial: Getting Started (Video Tutorial) Read the rest [Less]
Posted about 2 years ago by Italo Vignoli
Posted about 2 years ago by Mike Saunders
Zdeněk Crhonek (aka “raal”) from the Czech LibreOffice community writes: The Czech LibreOffice docs team has finished its translation of the Base Guide 6.4. As usual it was a team effort, namely: translations by Petr Kuběj and Zdeněk Crhonek; ... [More] revisions by Marcela Tomešová, Martin Kasper, Zdeněk Crhonek and Jan Martinovský; localised pictures by Roman Toman; […] [Less]
Posted about 2 years ago by Tomaž Vajngerl
Posted about 2 years ago by Italo Vignoli
Berlin, March 3, 2022 – LibreOffice 7.3.1 Community, the first minor release of the LibreOffice 7.3 family, targeted at technology enthusiasts and power users, is available for download from https://www.libreoffice.org/download/. This version ... [More] provides a solution to several LibreOffice 7.3 bugs, including the Auto Calculate regression on Calc, the crashes running Calc when lacking AVX instructions […] [Less]