summaryrefslogtreecommitdiff
path: root/svgio
AgeCommit message (Collapse)Author
2021-11-22Cleaning up math in SvgNumberHossein
* Simplifying math expression Change-Id: Ie67874eb79879186a1b971fbdc2c02945bae9191 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123092 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-11-19Use M_PI* instead of F_PI*Mike Kaganski
Change-Id: Ie2b7a1c74fc516781a17a20157b8217bc41e383d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125504 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-12improve mergeToSinglePolyPolygonNoel Grandin
spotted by llunak. No need to take param by &&, since mergeToSinglePol does not actually need to modify it. Also flatten it a little. Change-Id: I2f5ade347db756e21ecb0a88c3935805268f5072 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125086 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
2021-11-11Use o3tl::convertMike Kaganski
Change-Id: I62239252efed514de7db88b4bea6f4d4d719fb17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125021 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-03loplugin:finalclassesNoel Grandin
Change-Id: I10ff73f89c965beb3cfb5fc3a40dd959d8f77aaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124600 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-31Prepare for removal of non-const operator[] from Sequence in svgioMike Kaganski
Change-Id: I2ae44fc1016b062b574b3aa1e25f5b59b18e2fe4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124394 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-26Add documentation for the 'svgio' moduleHossein
The module 'svgio' is used to read SVG. This is the list of topics discussed in the documentation: * Introduction * How does it work? * Known Bugs * Dependencies * Related Software * References Change-Id: If42e9c2e10145c12cd5d74019b36bc5d78dd5bb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124178 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-10-17Use range based for loopsHossein
* Use range based for loops where it was possible in svgio + Goal: Better readability of the code Change-Id: I6259e2391006287d5d330277dd8d700012c32932 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123712 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-11loplugin:moveparam in svgioNoel Grandin
Change-Id: I4badd081340c9f8e8fcce97bd730f9c7da046382 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123426 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-10loplugin:moveparam in basegfxNoel Grandin
Change-Id: I73414e94358114ff0d475f13855db8c4c493b6f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123334 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-06Cleanup svgcharacternode.cxxHossein
* Replacing Ternary conditional operator "?:" with "if" statements * Adding using "namespace drawinglayer::primitive2d;" to avoid long statements Converting this: drawinglayer::primitive2d::TextStrikeout eTextStrikeout = drawinglayer::primitive2d::TEXT_STRIKEOUT_NONE; to this, which is much more readable: TextStrikeout eTextStrikeout = TEXT_STRIKEOUT_NONE; * This is avoided in the header file with only one usage of this namespace Change-Id: I0bbc80a894056806dc03f46df5b62d92c2cd4a0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123102 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-10-06loplugin:moveparam in drawinglayerNoel Grandin
Change-Id: I428116d96a011b061dda8376b6f27fb135a62964 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123114 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-24reduce copying in drawinglayerNoel Grandin
by passing PrimitiveContainer&& around. There are lots of place where we were preparing a local variable of type PrimitiveContainer, and then copying it someplace else, then throwing it away. Change-Id: Iacfd983640c9e55da25800ccc01734dfc8b4d64a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-22Extend loplugin:stringviewparam to starts/endsWith: svgioStephan Bergmann
Change-Id: Ia48465b86e6b2e5362b95a2b228414bfc6ac6490 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122481 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-09tdf#144052 reduce Primitive2D copyingNoel Grandin
when creating charts, by using a Primitive2DContainer&& parameter in the GroupPrimitive2D constructor, which forces the call sites to pass a temporary, and at most call sites, we can std::move in an existing local variable. Change-Id: I531970918800c6832ab606b5a4ff5fd2d47ccf5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121844 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-02clang-tidy:readability-redundant-member-initNoel Grandin
Change-Id: I39b9ac81d65f4a269293824642c1b2ec593c0584 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121490 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-22no need to use unique_ptr for B2DHomMatrixNoel Grandin
it is already a COW type Change-Id: Ide1dedfb8be7593bf45b0e78899450f04291f09e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120828 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-22no need to use unique_ptr for B2DPolygonNoel Grandin
it is already a COW type Change-Id: I86c4be9dd83b98eedf169c3b6668a7994204bca0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120827 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-22no need to use unique_ptr for B2DPolyPolygonNoel Grandin
it is already a COW type Change-Id: Iaf8bf1671781923555df3e43b0db78e87c2c5a87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120826 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-28loplugin:indentation improve checks for brace alignmentNoel Grandin
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-23EMF+ tdf#142975 Add brush support to DrawString recordBartosz Kosiorek
Change-Id: Icfcb4199dcd755fb20e14a8166571b6d6e763f2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117671 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2021-05-04svgio: instead of assert(false && ...) rather use SAL_WARN insteadTomaž Vajngerl
Previously OSL_ENSURE was changed to assert(false && ...) which wasn't a good idea as now we hit asserts in some cases, so rather than that, use SAL_WARN instead. Change-Id: I69740d71ae97a79ece56d77c3dd7d0ce83c9bb34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115040 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-01svgio: add test for SvgNumber::solveTomaž Vajngerl
Change-Id: I38aa58f9be104754d32ca985022947c3c7225f0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114963 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-01svgio: refactor SvgNumber::solve and SvgNumber::solveNonPercentageTomaž Vajngerl
Change-Id: I9eefe4e6d2edf9891dc20f451230aedd44592732 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114962 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-01svgio: move SvgNumber methods to its own SvgNumber.cxx fileTomaž Vajngerl
Change-Id: I2b52eaf83162b80ccc6f656a5808e8b2aa6c2541 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114961 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-01svgio: covnert enum to enum class in svgtools.cxxTomaž Vajngerl
Change-Id: Ib442bfc60d16021f314a063643e199a776afa10f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114959 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-01svgio: convert enum to enum class in svgstyleattributes.hxxTomaž Vajngerl
Change-Id: I97ac8922f4d6b921c2ef862f2168d14b66d8fc53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114958 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-01svgio: use pragma once in the header filesTomaž Vajngerl
Change-Id: I781e2083f4aab2e11bf78c3b941701ff7dd35772 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114957 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-01svgio: add test for svgtools starting with SvgNumberTomaž Vajngerl
Change-Id: I1f903a947fb1c338cf62980256c5369fefb7740e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114956 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-01svgio: move isPositive to the SvgNumber header fileTomaž Vajngerl
Change-Id: I05c7d59000ac7f14a5d34ed30273379f6fc31677 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114955 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-01svgio: move SvgNumber to its own header fileTomaž Vajngerl
Change-Id: I3f65b73cf0dd21e9818fa3596664662e1aa52c8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114954 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-01convert enums to enum classes in svgnode.hxxTomaž Vajngerl
converted XmlSpace, Display Change-Id: I4aced2d7c2f6fcb4adc59949a6ac22d4ddd375a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114953 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-01convert enums to enum classes in svgtools.hxxTomaž Vajngerl
converted SvgUnits, NumberType, SvgUnit, SvgAlign Change-Id: I703b1d9396f42b3af1a36c683628e90161f2717d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114952 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-04-30svgio: change some OSL_ENSUREs to (std) assertTomaž Vajngerl
Change-Id: Ie7e7e6276e5a528fb99a6dfda00e9826c5245fb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114899 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-04-30svgio: change SVGToken enum to enum classTomaž Vajngerl
Change-Id: Ic2618c91b1793463b7ce0a42ec1db100d11acfa4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114898 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-04-12update PCHsCaolán McNamara
Change-Id: Id3728ac0011d3deed7e56081e3a854c7fa5336f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113959 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-07Updated README.md files to represent current code / use Markdown formatHossein
Previously, all of the README files have been renamed to README.md and now, the contents of these files were changed to use Markdown format. Other than format inconsistency, some README.md files lacked information about modules, or were out of date. By using LibreOffice / OpenOffice wiki and other documentation websites, these files were updated. Now every README.md file has a title, and some description. The top-level README.md file is changed to add links to the modules. The result of processing the Markdown format README.md files can be seen at: https://docs.libreoffice.org/ Change-Id: Ic3b0c3c064a2498d6a435253b041df010cd7797a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113424 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-03-24Using .md extension/Markdown syntax for modules READMEHossein
Renaming all README files for all top level modules to README.md, applying no content change at this stage to be able to track history of the files. These files should be edited to use correct Markdown syntax later. Change-Id: I542fa3f3d32072156f16eaad2211a397cc212665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112977 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-03-21update pchesCaolán McNamara
Change-Id: I60e61133c305673bb305e41957f5414820c7c358 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112790 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-09Make sal/config.h the first in pchMike Kaganski
By convention, it should be the first include in C/CXX files; so use of pch should not break that. Change-Id: Ic329c5f39e8f48ad1778724368e262e48972342b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112123 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-06update pchesJulien Nabet
I just used ./bin/update_pch.sh Change-Id: I06a7f36eb4c511b8d6c6477fd87e57f0d9702457 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112097 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-02-23update pchesCaolán McNamara
Change-Id: I44424081b7f55710c4db7f10d1829de1ae08be76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111363 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-20loplugin:refcounting in svgioNoel
Change-Id: Id7669026fbe4b6cc92e2b137cba0c6c3c33f7712 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111259 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-08update pchesCaolán McNamara
Change-Id: Icf55ddda055d11b649e7607c2cdd8b6d6ddfefbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110483 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-09fix coverity parse errorsCaolán McNamara
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-04loplugin:stringviewparam: operator +=Stephan Bergmann
Change-Id: I30ce1b5bd8fb168da7067c1967c5af2569df2653 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108512 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-26New loplugin:stringliteralvarStephan Bergmann
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for details. (Turned some affected variables in included files into inline variables, to avoid GCC warnings about unused variables.) Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-04update pchesCaolán McNamara
Change-Id: I3e22c2000da03f6f3345353846213203993aa865 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107192 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-01tdf#42949 Fix new IWYU warnings in directories s*Gabor Kelemen
Except recently checked sc, sd, svx, sw Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ice1b86628e4f22a39f307b9c5fa567b6ab9d5acb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106917 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>