aboutsummaryrefslogtreecommitdiff
path: root/source/ug/basic
ModeNameSize
d---------source72logplain
gration'>feature/orcus-continuous-integration LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/filter/source/graphicfilter/icgm/class4.cxx
0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127763 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
AgeCommit message (Collapse)Author
2024-05-08loplugin:ostr in filterNoel Grandin
Change-Id: I9468cb2bf7b3614e5ee2e1ca6969282041699371 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167302 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2022-04-15ofz: Timeout 23s->4sCaolán McNamara
Change-Id: I10d48584e0ab0ce52cabe8077602f557b6392492 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133012 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-31tdf#147906 Use std::hypot for Pythagorean additionpragat-pandya
Change-Id: I38166d36e9e8518ab86ded7ab630a35f3a0c39d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132268 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-03-28tdf#147906 change all sqrt(a * a + b * b) occurences to std::hypot(a, b)offtkp
Other changes: In Splines.cxx, no longer divides dx, dy with fDiffMax because we switched to std::hypot, and hypot avoids intermediate overflows. Change-Id: I8c459a0e56deb86606fc9b1bf3e68b132a60705d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132073 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-15Use basegfx::rad2deg() instead of *57.29577951308Hossein
* Replaced multiplying by magic number 57.29577951308 with basegfx::rad2deg() which is equal to 180.0/M_PI * Instances of this could be found using: git grep 57.29577951308 *.cxx *.hxx Change-Id: I0ae99a5d63d104b79c6df2dc88e9dda6973a1d3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124226 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2021-09-19ofz: check radius argCaolán McNamara
Change-Id: Ife72cf379e60c96046205746c62a35ead7f09b16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122326 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-03cgm bounding box was originally Point and SizeCaolán McNamara
so keep it like that Change-Id: I0392f283b79174c831d29b1895817cf6ee35ba3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121597 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-30ofz#37831 avoid Integer-overflowCaolán McNamara
Change-Id: I95acce44623c6c5e48686a79314ffaf6ab402292 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121317 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-27ofz: Integer-overflowCaolán McNamara
Change-Id: I4142f48db0f756872ea75e1c39cda6195bdddf43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121127 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-24ofz: cgm Integer-overflowCaolán McNamara
Change-Id: I1cb1d5612f2b0b8999fed0d6c203ab24eedd4fe8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120898 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-07-28Related: ofz#36348 ubsan runtime error: value outside representable rangeCaolán McNamara
Change-Id: I0dbbba2c4020d7fc7e6f12aba4bfcb003fa13893 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119611 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2021-07-27ofz#36348 Integer-overflowCaolán McNamara
Change-Id: I7c6020e94c9ec9d002e66d0ad83426c062ebd5c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119574 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-30ofz#35504 clamp input values in cgm filterCaolán McNamara
Change-Id: I96712b8dc8f8eaad3fb8fa6710d0f07fff61b592 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118137 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-14ofz#33769 Integer-overflowCaolán McNamara
Change-Id: I6b76ab866cc843f52b3c0994e9812a0f1b87270c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117098 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-22long->tools::Long in emfio..filterNoel
Change-Id: I961cee10d45d628ff70dea0694a7a63a4fe867ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104624 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-02loplugin:reducevarscope in filterNoel
Change-Id: I665531de5b8a94c4646e2a85373a6f67a60f1c08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103812 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-09Introduce o3tl::make_unsigned to cast from signed to unsigned typeStephan Bergmann
...without having to spell out a specific type to cast to (and also making it more obvious what the intend of such a cast is) Change-Id: Id9c68b856a4ee52e5a40d15dc9d83e95d1c231cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86502 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-08tdf#75280 Convert inappropriate use of sal_uIntPtr to better integer typesYusuf Keten
Change-Id: Idf73b768671c0daa0d815b75ce71740fc0e5f5c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86310 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-12-17tdf#42949 Fix IWYU warnings in filter/Gabor Kelemen
Also drop inc/gfxtypes.hxx and source/svg/spirit_supplements.hxx which are unused since commit 3ca7be09834a26fbd1c371deabd7a58111092676 "Replace SVGFilter using SVGIO" Drop now unneeded pass-through header source/graphicfilter/icgm/main.hxx too. Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I8abaf294370c98256815a226168085dd01123f3e Reviewed-on: https://gerrit.libreoffice.org/84734 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-04-16Resolves: tdf#116999 fix reading cgm text at record boundsCaolán McNamara
Change-Id: Ibbff7b0a3c3447135e0f6c585914dc6018e51765 Reviewed-on: https://gerrit.libreoffice.org/52951 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-05ofz#7364 Integer overflowCaolán McNamara
Change-Id: I1b0f5e4e951dae396fefc6ec55f7f04a8503ea89 Reviewed-on: https://gerrit.libreoffice.org/52402 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-19loplugin:useuniqueptr in CGMNoel Grandin
Change-Id: Iecd9251f68cd894a14fb6824151768d4cb663e0f Reviewed-on: https://gerrit.libreoffice.org/49944 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-16Fix typosAndrea Gelmini
Change-Id: Ia976371bf52eb1216d8abe728d80bbb87a3c38a2 Reviewed-on: https://gerrit.libreoffice.org/47858 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-15More loplugin:cstylecast: filterStephan Bergmann
Change-Id: I65244623321e409b48915abea3dee49abee47249
2018-01-12More loplugin:cstylecast: filterStephan Bergmann
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I39cc98d11a608d5fdad11c621b4cbde285204095
2017-11-23loplugin:simplifybool can't invert conditions involving float typesNoel Grandin
so revert some of the changes from commit 7a1c21e53fc4733a4bb52282ce0098fcc085ab0e loplugin:simplifybool for negation of comparison operator Change-Id: I937d575b86c1e418805d399b0dc16ae91876b4fe Reviewed-on: https://gerrit.libreoffice.org/45130 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-23loplugin:simplifybool for negation of comparison operatorNoel Grandin
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791 Reviewed-on: https://gerrit.libreoffice.org/45068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-19Drop GetSdrObjectFromXShape and use SdrObject::getSdrObjectFromXShapeMike Kaganski
Change-Id: I0d233878ee49fcdc1338ec3bd700e5482d558163 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120694 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-19tdf#142264: make sure to load potentially unloaded objects when savingMike Kaganski
Commit 574eec9036c5f185b3572ba1e0ca9d111eb361dc happened to reveal a pre-existing problem that XLSX export only saved those OLE objects that were kept loaded in the OLE object cache, subject to thevalue of org.openoffice.Office.Common/Cache/DrawingEngine/OLE_Objects. Before that change, the imported charts were marked modified on load, and that prevented them from unloading in OLEObjCache::UnloadCheckHdl, because SdrOle2Obj::CanUnloadRunningObj returned false. After the mentioned change, the charts started to load without the wrong "modified" state, which allowed them to be properly managed by the cache, and the export filter implementation error surfaced. It's likely that commit 692878e3bb83c0fc104c5cca946c25ccf2d84ab2 tried to workaround the same underlying problem for charts that for some reason / at some point in time didn't get marked modified on load, and that commit converted an error shown in Excel into silently missing charts. This change makes sure that whenever a reference to chart document is requested from XclExpChartObj, it is actually loaded and ready for reading data. Possibly something could be done on the level of old reference that becomes non-functional (although valid) as the result of unloading, so that it would automatically reload on following use. That would make operating on the references robust. I didn't find an obvious way to do that. It is interesting to investigate, it the heizenbug related to images disappearing from documents, as users keep reporting without robust reproducers, might possibly be caused by a similar problem. Change-Id: I45fcdc98254157d805c7519340b5265526f27166 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120688 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-18loplugin:passstuffbyrefNoel Grandin
Change-Id: I4f01eb3842ef198f02af274f54afb2760c820a4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120655 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-08sc, VmlFormControlExporter: avoid OStringBuffer styleMiklos Vajna
It's more efficient to have just one big statement with all the + operations. See <https://gerrit.libreoffice.org/c/core/+/118488/2#message-425f5c995c78ed24df430154bec28d89dcef9eb3>. Change-Id: Ifc304a58f5e34e7654a800fe1163beeec3f791a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118635 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-07-08XSLX export, button form control: fix handling of no macrosMiklos Vajna
Turns out that in case there is no macro, then the attribute should be omitted, leaving it empty is not OK. Excel warns about this. Change-Id: I2dbc4d837bd585674e013eb3ce6b898f12498c4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118600 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-07-06XLSX export: handle macros on button form controlsMiklos Vajna
This builds on top of commit 1e3263a677b61c718d0fd1be15c066b933f7de18 (XLSX export: handle button form controls, 2021-07-01). The binary XLS export already had code to turn Calc macro names into Excel ones, reuse that for XLSX purposes. Also fix the unwanted named range on export, oox::xls::FormulaParser::importMacroName() mentions how XLSX doesn't have matching named ranges for vba macros (while XLS has), mirror this on the export side as well. Change-Id: I877b6ba2c2e834a2327482da5cadcddf1b4672bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118485 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-07-01XLSX export: handle button form controlsMiklos Vajna
This builds on top of commit 94678a7b9c6b7e577c15adacc885e03551bcf17b (XLSX export: improve handling of checkbox (form controls), 2021-06-30), so now both checkboxes and buttons are handled during export. Change-Id: I278b4925414d29399401cc15ab3d944db88ee0c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118219 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-06-30XLSX export: improve handling of checkbox (form controls)Miklos Vajna
This builds on top of commit fd238380ae7820f12ac1f7c52d0f7180a93f3ba3 (tdf#106181 XLSX export: output form controls, 2020-05-13) and adds the missing VML version which seems to be mandated by Excel 2019. It is not perfect (e.g. there is still an unwanted border around the checkbox), but the checkbox has a correct position and its label is readable, while it was just lost previously. Change-Id: I08198d068a0eb85061d138719cfc60d73c46398e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118168 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-04-02tdf#139786 partial revert tdf#106181 XLSX export: output form controlsJustin Luth
Not every export is going to be to OOXML format, so don't just set ooxmlexport to true and remove the "if" clause (especially when leaving the comment that this is for DOCX only). This is a partial revert to 7.1 (and backported to 6.4.5) commit 577dd32b1c4eb0a4cff574fbabca987cb52b831b. Change-Id: If7ea32a236715ec779cac302773c4c9da19865a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113399 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-04-02vcl: remove GetBitCount and GetColorCount from Bitmap{Ex}Tomaž Vajngerl
We can cast the PixelFormat enum to int for the same information and we can use the enum to reduce ambiguity when possible. Change-Id: I6ea648139465568cdeb12e5f5f75c7b609365bf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113188 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-21Some more unit conversion unificationMike Kaganski
Change-Id: I1a906d918bb4255a75c62c68a57244f59d51d2b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111269 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-01-29loplugin:stringviewparam extend to new..Noel
O[U]StringBuffer methods Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-24vcl: move access functions into appropriate bitmap access filesChris Sherlock
Split class functions into BitmapInfoAccess.cxx, BitmapReadAccess.cxx and BitmapWriteAccess.cxx Split header files into BitmapInfoAccess.hxx and BitmapReadAccess.hxx Change-Id: I7dcbe1d26c5b64d297658a6b809c93d7ad7f053d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108039 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-12-16tdf#128621 OOXML Chart: export embedded shapes in chartBalazs Varga
Use ShapeExport to export additional shapes (userShapes) in Chart. Change-Id: Ic70a7f84c4ac028b6f09a69bec2cf4949944b16c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107605 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-17crashtesting: clamp assert failure, hi < loCaolán McNamara
asserts since... commit bf4bbc3c2174b21577b8878bc3197923ba44a029 Date: Thu Nov 12 15:38:13 2020 +0200 replace std::max(std::min()) with std::clamp but looks wrong since... commit ff916ccce1527b63aad17bbae0ad02a834cd31d6 Date: Tue Sep 30 13:51:36 2008 +0000 CWS-TOOLING: integrate CWS dr63 - mnScrollMax = limit_cast< sal_Int16 >( nApiValue, mnScrollMin, EXC_OBJ_SBS_MAXSCROLL ); + mnScrollMax = limit_cast< sal_uInt16 >( nApiValue, mnScrollMin, EXC_OBJ_SCROLLBAR_MIN ); Change-Id: I002c764ed7129b1a66a7c827422b9d64034c6e53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106012 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-17loplugin:stringviewparam check methods tooNoel
not just functions Change-Id: Icca295dd159002b428b73f2c95d40725434f04d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105789 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-20use tools::Long in scNoel
Change-Id: I8f37a8d1174ed816df971b8cee036d4e88d4a7fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-08loplugin:flatten in sc/filter/excelNoel Grandin
Change-Id: I48ab5b20a3345cd40d4715c3ff025d2df3b491fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100337 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-07Use std::optional to allow optional inclusion of attributesMike Kaganski
... instead of converting the O(U)String objects to char*. Eventually this could allow to drop variants of *Element that take XFastAttributeListRef. Change-Id: Ib2748fcd93e655c55a176c00410fdcc7f052930d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98179 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-07-06Don't explicitly convert OUString to OStringMike Kaganski
See commit 57afeb8d9e35933630568a02fc48a00f5582b261 Change-Id: Idb41fb2e3b90bd0eb1d7ebd588c13fd50b9536fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98173 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-26tdf#106181 XLSX export: output form controlsSerge Krot
Prepared general algorithm to ouput form controls into XLSX. For now only CHECKBOX is supported with a possibility to link withem to any worksheet/cell. Change-Id: Ide8739d81ffb755aeae074c4ebecf24251383e34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94161 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-10new loplugin:simplifypointertoboolNoel Grandin
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-30loplugin:makeshared in scNoel Grandin
Change-Id: I512d05ea24c519c25f03a35842e362bf23f05693 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93198 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-27Make upcasting css::uno::Reference ctor require complete typesStephan Bergmann
The main reason for the "home-grown" UpCast introduced with 904b3d1fceee5827076758ed2a81f80cb73493ca "Up-cast conversion constructor for css::uno::Reference" in 2013 was probably that we could not yet rely on C++11 std::is_base_of back then. A (welcome) side effect was that the derived class could be incomplete. However, specializations of UpCast relying on whether or not T2 is incomplete are obviously an ODR violation if the type is incomplete in some TUs and complete (and derived from T1) in others. And even if UpCast had internal linkage, it would still be brittle that its behavior depends on the completeness of T2 at the point of the template's instantiation, and not necessarily at the point of use. That means we should better base that ctor on std::is_base_of (which we can do now since 39a1edd6fec902ef378acce8af42c4d7fba280d0 "Make css::uno::Reference upcast ctor LIBO_INTERNAL_ONLY"), which causes a compilation error at least on Clang and GCC if the completeness requirements are not met. This change fixes all the cases where types need to be complete now, plus any resulting loplugin:referencecasting warnings ("the source reference is already a subtype of the destination reference"). Change-Id: Ieb9e3552e90adbf2c5a5af933dcb872e20661a2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92950 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-25convert excel filter in calc from shared_ptr to rtl::ReferenceNoel Grandin
ref-counting traffic here accounts for 10% of the profile on some of my calc imports. Change-Id: I1b32e0e61d7bf5eb65780ec0e7fcb99f6576050a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>