summaryrefslogtreecommitdiff
path: root/sw/source/core/graphic/ndgrf.cxx
AgeCommit message (Collapse)AuthorFilesLines
8 daysDrop FRound, and use generalized basegfx::froundMike Kaganski1-2/+1
Change-Id: I7447e649dc3ef4e51242f69c7486a3e84e103d2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166159 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-09loplugin:fieldcast in SwGrfNodeNoel Grandin1-8/+7
Change-Id: I95411fa20c38238d1ee74e8d73dd0a9553b9ad45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159169 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-29loplugin:unusedmethodsNoel Grandin1-15/+0
Change-Id: I95ab7581dec35b113cb657ce8e5ee27c89c73593 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153746 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-20loplugin:unusedmethodsNoel Grandin1-8/+0
Change-Id: Ief95f111350808f010539bb733a553007d30a9df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152006 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-15replace RES_GRAPHIC_PIECE_ARRIVED and RES_LINKED_GRAPHIC_STREAM_ARRIVEDBjoern Michaelsen1-4/+2
- also use SfxHintIds and get rid of some dynamic_casts Change-Id: Id12d72fb726c1d747008f72defd6ba9eba3ba253 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146820 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-08-13pass SwNode instead of SwNodeIndex to SwNode constructorsNoel Grandin1-6/+6
part of the process of hiding the internals of SwPosition Change-Id: I0b2dd3e24c82c1551a7275ffc78991823354858a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138224 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-29use more string_view in INetURLObjectNoel Grandin1-1/+1
Change-Id: I4462f7cf4740fa4d1b129d76a0775f4250f41bbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133555 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-19new loplugin:stringviewvar looks for OUString vars that can beNoel Grandin1-2/+2
... that can be string_view Change-Id: I0ddf66725e08b58e866a764f57200dd188b9f639 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133066 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-16use more string_view in swNoel Grandin1-4/+5
Change-Id: Iaf4db41d913dde13ea1ceb3fbbb3dafc21f90d24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133098 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-15Recheck include/[a-d]* with IWYUGabor Kelemen1-0/+1
See tdf#42949 for motivation Change-Id: I42475b8e75951d5dcae2fe6b0ad0bca64441e7f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126837 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-09-06clang-tidy:readability-redundant-member-initNoel Grandin1-2/+0
Change-Id: I706eebc3e4e2bbcb9bf250a4864937fd1447498c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121690 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-08tdf#104995: Fix opposite cropping issue on flipped images in WriterBayram Çiçek1-4/+25
In Writer, cropping an flipped image crops the opposite side of the image instead of the selected side. Fix: update crop values after the flipping(mirroring). Change-Id: I55cfed086bbf63b0c516e1cb6b2624c02b04a6da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116770 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2021-01-13transparency->alpha in GraphicAttrNoel1-1/+1
Change-Id: I1fe9311871724ff8b7b8960f5dba6e890198565c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109211 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-09~SwModify: do not silently tolerate clients registered past deathBjoern Michaelsen1-0/+1
- Make SwFormat/SwContentNode explicitly resetting the page desc. before death instead of SwFormatPageDesc trying to do that on the dying hint: * the dying hints is send _after_ the SwFormat/SwContentNode dtor are completed, so the RTTI magic did not work anyway * simply resetting the attribute in a final dtor and make SwFormatPageDesc just check to never get a dying hint (because it should have been destructed by reset) is a lot less errorprone. Change-Id: I231f1729729491ba7544e5ba93d81192b212e2ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108648 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann1-1/+5
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-29use Degree10 in SwRotationGrfNoel Grandin1-1/+1
(*) Fix SwRotationGrf::GetPresentation to return a more accurate string (*) Add utility functions sal_Int32 toDegree100(Degree10) double toRadians(Degree10) (*) Fix SwVirtFlyDrawObj::GetRotateAngle to return the angle in the units that svx expects (deg100) which was introduced in commit c2e30949e0fb7c6a73742450f646e0d8d59d5e4f Date: Wed Apr 10 15:13:53 2019 +0200 lok: writer: svg export transformed images and consequently we can remove the kludge from that commit in SdrMarkView::SetMarkHandlesForLOKit Change-Id: I1a8c5f3a417f887f85b92ae5464578e9ee251619 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108406 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-24tdf#42949 Fix new IWYU warnings in directory swGabor Kelemen1-1/+0
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I4bb84c3f401aba8a3dede9cec3a7f2187a2ba02a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106473 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-18Remove unused GraphicObject::SetGraphic pCopyObj and rLink parametersStephan Bergmann1-6/+6
The defaulted pCopyObj parameter of the first SetGraphic overload became unused with ea3d755ac949c1b6dada5c341e018f8c23f5d395 "vcl: detach usage and remove GraphicManager and GraphicCache", and then the rLink parameter of the second overload became unused with e4eb416c3ef81d098ed61caabd2077cbbb2418bc "remove swapping and link from GraphicObject and Graphic" (removing the need to have two different overloads). Change-Id: I15a648845ed474ee302e2a9836776ba74b9c44a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106045 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-17SwGrfNode: Remove graphic arrived hackBjoern Michaelsen1-17/+2
Change-Id: Ib8fb5b223a1b3cc05a75ecfcc7c763bbb3928fae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105965 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-17SwGrfNode: Replace needless SwClientNotifyCalls with CallSwClientNotifyBjoern Michaelsen1-12/+3
Change-Id: Ib11b55cc800299947c1172ca47f84d3bc8833dea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105961 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-12replace RES_GRF_REREAD_AND_INCACHE with sw::GrfRereadAndInCacheHintBjoern Michaelsen1-2/+1
Change-Id: I8b36fd0dde6f4e7f83cf73dc8b6aefb196babb8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105571 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-12Make SwClientNotifyCall protectedBjoern Michaelsen1-3/+3
Change-Id: I1da6cd45c5039f2b36ae6d8a64febc69eda9c6d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105569 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-05retire most of SwModifyBjoern Michaelsen1-3/+3
only remaining uses are: - in calbck.{c,h}xx - in uwriter unittests - as a parameter of SwClientNotify all other uses have been replaced with sw::BroadcastingModify, which contains sw::BroadcastingMixin functionality. Existing code should then be moved to sw::BroadcastingMixin (only) as soon as possible. Change-Id: Ief7895597633c2fcb97e1cbc182905d75feb1567 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105320 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-02Fix typosAndrea Gelmini1-1/+1
Change-Id: Ifc4b1c24b41a9ca7e7b3adcc46e3498f3af5a0b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105192 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2020-11-02SwGrfNode: ModifyNotification no more ...Bjoern Michaelsen1-2/+23
Change-Id: I6c1fda1d92c4e3511113fcd8a8bc09efba96e3e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105180 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-01sw/source/core/doc: Stop abusing observer pattern for code obfuscation.Bjoern Michaelsen1-2/+2
The old SwClient/SwModify combo is a questionable implementation of the observer pattern (among other things). The one thing the observer pattern is good for is dependency inversion: The creator of the message does not need to know the type of the receiver. Calling the message handling on the receiver directly introduces tight coupling and entirely defeats the purpose, leaving us with the worst of both worlds. In such case, at least be honest about the tight coupling and call a somewhat more explicit member function of the target. Thus introduce SwFootNoteInfo::UpdateFormatOrAttr, SwContentNode::UpdateAttr, remove some useless SwFormatChg clutter in Set{Foot,End}NodeInfo, and check for some invariants in SwContentNode::SwClientNotify to limit some of the "a message are two void pointers" madness. Change-Id: I32a8d6973231bb5f65c9e144be72d5bcf98f3f44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105104 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-10-30SwGrfNode: ModifyNotification no moreBjoern Michaelsen1-5/+14
Change-Id: Iea856fd84d08678d1d7d3041df518f58fcd6b28a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104983 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-10-21new tools::Degree10 strong typedefNoel Grandin1-1/+1
partly to flush some use of "long" out the codebase, but also to make it obvious which units are being used for angle values. Change-Id: I1dc22494ca42c4677a63f685d5903f2b89886dc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104548 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-04MakeCopy family never called with a null SwDoc* argCaolán McNamara1-2/+2
Change-Id: I4ba4569a529425a5e92fb3f82990e34ae4db3228 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103877 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-30SwNode::GetDoc can return a reference insteadCaolán McNamara1-6/+6
and remove discovered redundant null checks Change-Id: I6b8bc9593434f38947e399a48888a8fa0d4f7e77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103640 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-14loplugin:simplifybool moreNoel Grandin1-1/+1
look for expressions like !(a && !b) which can be expanded out Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-03tdf#42949 Fix IWYU warnings in include/[t-x]*/*hxxGabor Kelemen1-0/+1
Recheck after 7-0 branchoff Also drop the now unused file include/vcl/field.hxx Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I9e54c82f50d1e02a0f99858939cac999fc66f7de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99261 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-07-31loplugin:flatten in sw/core/frmedtNoel Grandin1-104/+104
Change-Id: I64f743d6f696584ff4c3c9185ae1e8fa42451677 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99884 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-12replace and remove VectorGraphicDataPtr typedef for the real typeTomaž Vajngerl1-4/+4
There is no need to hide std::shared_ptr<VectorGraphicData> type under an alias name. It doesn't make the code more understandble and it usually is the exact opposite because we know with what type we are dealing with. Change-Id: Iec80ee99697ff2fe3a8275fc2787b5370510ebe6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92069 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-03-31convert enum to scoped in SvBaseLinkNoel Grandin1-7/+7
Change-Id: Ief399381ac27764fce95ee053c322571a07b671c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91366 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-17pdfium: Make Insert -> Image... use VectorGraphicData for PDF.Jan Holesovsky1-2/+1
In principle, the current Svg/Emf/Wmf and PDF handling is trying to achieve the same thing: Keep the original stream untouched, provide a replacement graphics, and a kind of rendering. To hold the data, the Svg/Emf/Wmf and PDF were using different structures though. This commit consolidatates that, and makes the Insert -> Image... (for PDF) actually using the VectorGraphicData to hold the original stream. This breaks loading the PDF as a document via PDFium - I'll fix it in the next commit(s). Change-Id: Iac102f32b757390a03438c165e430283851cc10b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90561 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-03-10tdf#131185 Prevent unnecessary SwapIn calls.Gülşah Köse1-2/+7
When the http response is 404 or something like that we shouldn't retry the download embeded image constantly. This causes libreoffice to short freezes. Change-Id: I7381d04f12e9fbea961dd0e3333ea0d39aa93d14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90102 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2020-01-13sw: prefix members of SwGrfNode and SwChartLabeledDataSequenceMiklos Vajna1-65/+65
See tdf#94879 for motivation. Change-Id: I6a752a952e41302620463682c3361fad7e639df4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86656 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-11-14tdf#42949 Fix IWYU warnings in sw/source/core/[e-l]*/*cxxGabor Kelemen1-9/+0
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I173b3aaca84a707799f0ee78cddcbd70524897bc Reviewed-on: https://gerrit.libreoffice.org/82561 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-17Rename OUStringLiteral1 to OUStringCharStephan Bergmann1-2/+2
It started out as a wrapper around character literals, but has by now become a wrapper around arbitrary single characters. Besides updating the documentation, this change is a mechanical for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f Reviewed-on: https://gerrit.libreoffice.org/80892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-05Fix typosAndrea Gelmini1-1/+1
Change-Id: Id45d6586cae8c80291e961e98698e5c64e40c35d Reviewed-on: https://gerrit.libreoffice.org/76974 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-02-22Remove confusing commentMatteo Casalin1-4/+1
Change-Id: I0e19228b50a19085c9eee70372b34a07e7255091 Reviewed-on: https://gerrit.libreoffice.org/68115 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-08Initialize some OUString with proper valueMatteo Casalin1-4/+5
Change-Id: I2f5676e9973d476aa709f9dfb4a903b09edaafeb Reviewed-on: https://gerrit.libreoffice.org/67336 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-04tdf#119661 remove the original URL when removing a graphic linkTomaž Vajngerl1-1/+2
Change-Id: I8c875202ba8af9cbcd7eb9ce0db78f97d56a07a8 Reviewed-on: https://gerrit.libreoffice.org/67337 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-07move SvTreeListBox to vclCaolán McNamara1-1/+1
Change-Id: I04a146d3d8a428ac1678827dc883525c40240a44 Reviewed-on: https://gerrit.libreoffice.org/62787 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-17clang-tidy readability-redundant-smartptr-getNoel Grandin1-1/+1
redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-19sw: add a real create-no-frames flag to MakeCopy/MakeTextNodeMichael Stahl1-1/+1
SwNodes::CopyNodes calling MakeCopy() and then immediately DelFrames() considered silly. Apparently SwOLENode/SwGrfNode don't actually create frames anyway since that is done via their SwFrameFormats, so they just ignore the parameter. Change-Id: I8a8f52da1d25bb5689345e956a33aebd727e8fc7
2018-09-19sw_redlinehide_2: fix ordering of SplitNode usage of ContentIdxStoreMichael Stahl1-5/+0
The problem is that now the ctor of SwTextFrame will check the redline positions, but the call to MakeFramesForAdjacentContentNode() happens before the call to ContentIdxStore::Restore() that updates the SwPositions of the redlines, hence they point to the wrong node. Try to fix this by not calling Restore directly but pass in a closure to SwTextNode::SplitContentNode() so that it can call ContentIdxStore::Restore() before frames are created and redline positions are checked. Also remove the useless SwContentNode::SplitContentNode() - only the SwTextNode override actually did anything. Change-Id: I2088fd124d04cf354f4f0f691a50ff5217d778d7
2018-09-19sw_redlinehide_2: add layout parameter to *Node::DelFramesMichael Stahl1-1/+1
A trivial patch to remove some FIXMEs; unfortunately one new FIXME because the SwSectionNode case isn't entirely trivial. Change-Id: I94f11ffd19b189b165ad1fb05488ba8617e81357
2018-09-12loplugin:simplifyconstruct in swNoel Grandin1-3/+0
Change-Id: I17c9009637edc04d9d06fa9a0bd19572eefd4fe8 Reviewed-on: https://gerrit.libreoffice.org/60370 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>