summaryrefslogtreecommitdiff
path: root/vcl/inc/impgraph.hxx
AgeCommit message (Collapse)Author
2024-07-12tdf#129244: Let ImpGraphic update its buffer for new pixel sizesMike Kaganski
It used getVectorGraphicReplacement once, getting a bitmap with pixel size that depended on the default device DPI, unrelated to the needed bitmap size. It was not updated later, using the cached bitmap for any requested size. The DPI passed to convertPrimitive2DSequenceToBitmapEx must represent the relation between the vector logic size and the pixel size of the generated bitmap, not the target device DPI. This change introduces VectorGraphicData::getBitmap to obtain a bitmap for any requested pixel size, and uses it every time in the introduced ImpGraphic::updateBitmapFromVectorGraphic method every time it needs a new size of the image. Change-Id: Ife1305821fff28f0cd4070615ab032211a5d8c4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170391 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-06-27vcl: Remove graph. reader context from {Imp}Graph and GraphicReaderTomaž Vajngerl
This removes the mpContext member variable from ImpGraph, which also make {Get,Set}ReaderContext on Graphic obsolete and is also removed. GraphicFilter and other code is adjusted and simplified. Change-Id: Icd1927d7b1bd4624b523d0f49a4343911ec6cd0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165214 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-04-02Fix UBSan RTTI needsStephan Bergmann
...vcl_graphic_test now failed with > DynamicLibraryManagerException: "Failed to load dynamic library: workdir/LinkTarget/CppunitTest/libtest_vcl_graphic_test.so > workdir/LinkTarget/CppunitTest/libtest_vcl_graphic_test.so: undefined symbol: _ZTI10ImpGraphic" Change-Id: I1d11a50ef9dbb0003f7bc66540829b43c1412a16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165653 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-03-30vcl: add resetLastUsed to ImpGraphTomaž Vajngerl
We reset the last used member variable in many places in the same way, so instead of duplicating the implementation, add that to a method. Change-Id: I747559ecf1a6736f976b4d560ab5052c19431898 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165207 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-03-30vcl: change (graphic) Manager into a general memory managerTomaž Vajngerl
Graphic memory manager was changes so that it can work with any object that implements a specific interface (MemoryManaged). With this it will be possible to use other objects (that take a lot of memory) to be managed by the manager. It is also a first step to move memory managin responsibilities away from Graphic and move it into the specific objects instead (BitmapEx, Animation and VectorGraphic). Change-Id: I7638bd89a1c9ece5c4bc95b506d2192492894ef3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164958 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-03-23vcl: set "default" type only thorugh a ImpGraphic constructorTomaž Vajngerl
and do some more clean-up. Change-Id: I28c33887226444046d21076118fd066eb3a231d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164947 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-03-22vcl: simplify constructors of ImpGraphicTomaž Vajngerl
Change-Id: I6df0da16d777549e6187327271868774498d073b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164694 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-02-19hide more symbolsNoel Grandin
using the bin/find-can-be-private-symbols.py script to find classes with large numbers of exported symbols that can hidden. before exported = 58104 imported = 30810 unused_exports = 35433 after exported = 55094 imported = 31073 unused_exports = 32423 Change-Id: Idd0a70ee3740afd5ca1a86771e0e2ff8090d102d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163456 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-11lok: add trimMemory capability, and expand dumpState to caches.Michael Meeks
Being able to trigger some more aggressive memory saving is useful in for both online and mobile. Change-Id: I9b91c9fe9eecec06c75112595deac0bfeb94c144 Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148624 Tested-by: Jenkins
2022-12-29use TempFileFast for vcl graphics swapoutNoel Grandin
which is considerably faster on Windows when there is lots of system RAM available. Change-Id: I6ebde79af06f4e969231089783f1d4109f70ea94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144851 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-13clang-tidy modernize-pass-by-value in vclNoel Grandin
Change-Id: I9ddb786eb88213c53cf53067ced6899ca40ac6e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137000 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-21vcl: rename mnExtraData to mnRendererIdChris Sherlock
The name "extra data" doesn't really describe what this field does. What it actually does it to specify what animation renderer should be used. Change-Id: I1e705ba89d09ceb41a8649c8947225c7b6816e7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/76403 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-08-18loplugin:constparamsNoel Grandin
Change-Id: Ic7410f836e584df45101e78e345c8b3c8d355e09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-10flatten ImpGraphic a littleNoel Grandin
Change-Id: If7d7462571cbee1c54965678fab790959c6e3f33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120218 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-19ImplPlayWithRenderer never checks its OutputDevice against nullptrCaolán McNamara
just pass a reference instead and spread that around to some similar cases Change-Id: Ifb2dee8c7bf02a9f01982b928c90666cbbdd84fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115759 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-05loplugin:constmethodNoel Grandin
Change-Id: I7913fd8144d521b8293ac43036d0fad82e457cd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115145 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-26loplugin:passstuffbyrefNoel
Change-Id: I330e0ab6c9955939dad313f9d472f93e39dbd313 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109924 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-22vcl: support creating a Graphic with only GfxLink as swapped-outTomaž Vajngerl
This adds support to create a Graphic with only a GfxLink and the Graphic is in a swapped-out state. This is similar to the prepared state, but the prepared state is a special state of the Graphic. In the future, all loading will probably be done in this way and prepared state will go away, but for now this is only supported for PDF and is used in PDFium import only. The main reason is to avoid that a multi-page PDF is immediately swapped out after loading, which just does unneeded work and freezes the application for a while. Change-Id: I409741d27a4ad309264cdf27b2ba03f2cf37ead9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109600 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-01-19vcl: remove "Impl" prefix for method names in ImpGraphicTomaž Vajngerl
Change-Id: I86b63815d30100395181e5a6e9d343d2b7228c13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109460 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-12-30vcl: remove {Read,Write}ImpGraphic and ImplExportNative from GraphicTomaž Vajngerl
ReadImpGraphic and WriteImpGraphic have been reimplemented in the TypeSerializer some time ago, but the code has not yet been moved to use that class. This commits does that and changes all the code using those 2 methods and removes them. With this implemented in the TypeSerializer, it is easier to handle In addition it also removes ImplExportNative (and the method on the Graphic interface). This was really used only in one method, and it could be implemented in the mthod itself. Change-Id: I0982429d1c1d5ed7ef07627d87ed9a08df43f040 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108256 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-12-28ImpGraphic: inline loadPrepared as it is used only in one placeTomaž Vajngerl
Change-Id: Id3753522f016d3c619e6ef8c68b3172768b5ca90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108254 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-12-27ImplGraphic: set PrefSize, PrefMapMode without forcing a swap-inTomaž Vajngerl
This adds methods to set the PrefSize, PrefMapMode directly with no forced swap-in. Use this setters during a swap-in as it is now safe to do so, otherwise it would cause an endless-loop. Change-Id: I52b424ffc920c5a760891672c1ef961c1b1c1b64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108253 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-12-15graphic: Rework swapping algorithm to take GfxLink into accountTomaž Vajngerl
This reworks the Graphic swap algorithm to not swap to a file when GfxLink is available and leaves the compressed data in memory. With such a sheme, at swap-out we just remember the need specific properties of the Graphic, and delete the graphic content (Bitmap, Animation, VectorGraphic, Metafile). At swap-in use the GfxLink data to decompress and recreate the graphic content, then set the properties back as they were before (if needed). If a GfxLink is not available it swaps out to a file and back, but uses a simpler data format that is specific for swapping only. In the future this case can be removed, when we switch to automatic creation of GfxLink if that one is not present. For reworking of swapping it was also necessary to extensively add and extend the tests that check various swapping scenarios. Change-Id: I135a224f74aa48e6006f48dd2be74b8026614728 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107287 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-12-06vcl: duplicate {Read,Write}ImpGraphic for swappingTomaž Vajngerl
For swapping we can change the algroithm of saving and rading graphics to/from the swap file as the file format doesn't need to be stable. This duplicates the algorithm, but doesn't change it yet. Change-Id: I0b0854b19f4e3f9a34d278f44bd61cd94e133def Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107284 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-10-19use tools::Long in vclNoel
Change-Id: Ice1055021e8568634e9a66ba89d3bb4ef4e731df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104522 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-16try to make available all slide images using threadsLuboš Luňák
Graphic::makeAvailable() is not thread-safe, but the jpeg loader is capable of that, and the graphic can be loaded using the stream data (which is what ultimately makeAvailable() will do anyway). This loads all images faster using threads instead of them being loaded one by one on-demand. Change-Id: Ifc39a2757834a9fb0dbafa61f13f5454e69af330 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104082 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-10-06loplugin:const* make some params and methods constNoel
Change-Id: If7fbb25037343e18081a8ee7064840d75e9a45a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104010 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-25ImpGraphic: rename Impl{Read,Write}Embedded - used only in swappingTomaž Vajngerl
ImplReadEmbedded and ImplWriteEmbedded are used when swapping only so rename it to swapInContent and swapOutContent. In addition change the swapInFromStream to accept SvStream by reference and not pointer. Change-Id: I2c555c436fe5eb6583d83382a2da278f4890ee08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103400 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-08-17vcl: save and load the page number when swapping the graphicTomaž Vajngerl
PDF vector graphic includes a page number, of the page that the graphic is rendering. This however isn't remembered when swapping out and back in the graphic, because the serialization format doesn't include it. This adds a version 2 of the serialization format, with an additional page number (page index) attribute. Also changes the GraphicTest to account for an additional 4 bytes written and the change of the checksum. Change-Id: Ic0fbfc4ad983f7880e06956da3b4664bd4b610d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100836 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-08-15remove constructor with plain Bitmap from Graphic, use BitmapExTomaž Vajngerl
Change-Id: Ie429a10a8f54c6779d437ee4bc75a5ea0c427848 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100727 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-04-27ImpGraphic: rename ImplCreateSwapInfo and simplifyTomaž Vajngerl
ImplCreateSwapInfo changed to createSwapInfo. Flatten the code body Change-Id: I5865373d0b7f3cc717a9600bcf6fd198e8320e35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92947 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-04-27ImpGraphic: move content of swapOutToStream into swapOutTomaž Vajngerl
Change-Id: Iec0227b1e1ceebda961e158315ea5e56c2d33204 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92946 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-04-26ImpGraphic: encapsulate members of ImpSwapFileTomaž Vajngerl
Change-Id: I882d30f2f27149c865160b3fa68fa974701cea71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92921 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-04-26Test swapping of GraphicTomaž Vajngerl
Change-Id: I895002aa31380d2b5bc2593e66080f3fc94034e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92920 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-04-26ImpGraphic: rename maEx to maBitmapEx in the comment tooTomaž Vajngerl
Change-Id: Ida7ecf82d9e54d3a3703b836870534dbf41e51ba
2020-04-26ImpGraphic: rename maEx to maBitmapExTomaž Vajngerl
Change-Id: I49dd552010d008cc486c6aaf51e226cc5bf4a1cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92908 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-04-26remove Impl from swap method names in ImpGraphicTomaž Vajngerl
Change-Id: Ie235b6d02582d4d5ee3dc3d9d2be7f022bcb13c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92906 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-04-14tdf#131496 vcl image lazy load: speed up vector images with custom pref sizeMiklos Vajna
This speeds up the loading of the bugdoc: - old cost: 6378 ms - new cost: 1891 ms (30% of baseline) Images were initially loaded at import time, but commit acb803b730f2c6bd82e39beab58949ec14f85eb0 (tdf#125591 DOC import: lazy-load metafiles with explicit size, 2019-06-11) changed this, so that they are lazy-loaded. That improved performance, but sometimes gave incorrect results. Then commit d8371cdfd092c6426c01aae130ea4eaa6d627a6f (tdf#127446 vcl image lazy-load: fix custom size handling of metafiles, 2019-09-30) fixed the correctness problem, but the loading was no longer lazy in the tdf#131496 case. This is an attempt to bring back lazy-loading for vector-based images, while maintaining the correct preferred size. The problem was that the PPT import triggered a vector -> bitmap conversion during load: #0 0x00007ffff03c7e36 in ImpGraphic::loadPrepared() (this=this@entry=0x1f88a90) at vcl/source/gdi/impgraph.cxx:1424 #1 0x00007ffff03c72c7 in ImpGraphic::ImplSwapIn() (this=0x1f88a90) at vcl/source/gdi/impgraph.cxx:1444 #2 0x00007ffff03c7535 in ImpGraphic::ensureAvailable() const (this=this@entry=0x1f88a90) at vcl/source/gdi/impgraph.cxx:1402 #3 0x00007ffff03c9481 in ImpGraphic::ImplExportNative(SvStream&) const (this=0x1f88a90, rOStm=...) at vcl/source/gdi/impgraph.cxx:1590 #4 0x00007ffff03bf9a8 in Graphic::ExportNative(SvStream&) const (this=this@entry=0x20534e0, rOStream=...) at vcl/source/gdi/graph.cxx:544 #5 0x00007ffff1c79a28 in svt::EmbeddedObjectRef::SetGraphicToContainer(Graphic const&, comphelper::EmbeddedObjectContainer&, rtl::OUString const&, rtl::OUString const&) (rGraphic=..., aContainer=..., aName="Object 1", aMediaType="") at svtools/source/misc/embedhlp.cxx:773 #6 0x00007ffff1c79b6f in svt::EmbeddedObjectRef::AssignToContainer(comphelper::EmbeddedObjectContainer*, rtl::OUString const&) (this=0x207ae90, pContainer=pContainer@entry=0x1f8de40, rPersistName=...) at svtools/source/misc/embedhlp.cxx:369 #7 0x00007ffff239f736 in SdrOle2Obj::Connect_Impl() (this=this@entry=0x20734f0) at svx/source/svdraw/svdoole2.cxx:984 #8 0x00007ffff23a6310 in SdrOle2Obj::Init() (this=this@entry=0x20734f0) at svx/source/svdraw/svdoole2.cxx:695 Try to defer that conversion by not doing a maVectorGraphicData->getReplacement() in ImpGraphic::ImplSetPrefSize(), rather just store the preferred size and apply it later when getReplacement() is called. This helps, because the above OLE-from-PPT case loads the graphic, but only to export it as SVM, so it doesn't need a vector -> bitmap conversion otherwise. Change-Id: I24790c0a3e298d5fbb3faff35d529e79cc72845a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92144 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-04-12replace and remove VectorGraphicDataPtr typedef for the real typeTomaž Vajngerl
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-18pdfium: support for pages when using PDF import with pdfiumTomaž Vajngerl
Moving PDF to use VectorGraphicData in Graphic has temporary removed the support for showing different PDF pages when opening the PDF using pdfium (LO_IMPORT_USE_PDFIUM=1). This adds the support for back by specifying whcih PDF page to render when creating the VectorGraphicData (and can't be changd afterwards), which is used to create a Graphic and contains the PDF source data array. Change-Id: Ib915216b8d4c0c063d0fead44ff156b1915a35d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90562 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-03-17pdfium: Make Insert -> Image... use VectorGraphicData for PDF.Jan Holesovsky
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-02-25vcl: move GraphicID out of impgraph.{cxx,hxx}Tomaž Vajngerl
Change-Id: I0b3b17736a76be290f6e5b77ee547b7e650d4489 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89449 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-08-26loplugin:returnconstval in new pdf codeNoel Grandin
Change-Id: I11fdc9a0dcf745dacd516cfc8540a8fb67c45b6c Reviewed-on: https://gerrit.libreoffice.org/78106 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-25sd: unit-test to check that PDF stream is shared among Graphic instancesAshod Nakashian
Reviewed-on: https://gerrit.libreoffice.org/70162 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit d3a9bdd982ad1ed17cb6fef91885fc4dcf442fdb) Change-Id: Iebd85e5e60c76e6d0756d15e1fa6107a3fcc837d Reviewed-on: https://gerrit.libreoffice.org/77693 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2019-08-25pdfium: Returning a const std::shared_ptr<...>& is not recommended.Jan Holesovsky
Change-Id: Iff6acef712c5b95c8cc222fc5293c9304b1c03ec (cherry picked from commit c0a3f61ef5c42d6cfa7484a2c759e7638da2c096) Reviewed-on: https://gerrit.libreoffice.org/77692 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2019-08-25pdfium: Use std::vector to hold the PdfData.Jan Holesovsky
This fixes the destruction of the static cache of the PDF data; without this, there were already missing uno runtime info. (cherry picked from commit 20055ebe1b27f716a2acf1f0f4dda2864ae811bf) Change-Id: I877c9ccf96c4b7eabf3d643e17f324d86d987f94 Reviewed-on: https://gerrit.libreoffice.org/77691 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2019-08-23Mark move ctors/assignments noexceptMike Kaganski
This should enable using move semantics where possible e.g. in standard containers. According to https://en.cppreference.com/w/cpp/language/move_constructor: To make strong exception guarantee possible, user-defined move constructors should not throw exceptions. For example, std::vector relies on std::move_if_noexcept to choose between move and copy when the elements need to be relocated. Change-Id: I6e1e1cdd5cd430b139ffa2fa7031fb0bb625decb Reviewed-on: https://gerrit.libreoffice.org/77957 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-22loplugin:constmethod in vclNoel Grandin
Change-Id: I20545527b117c9562b91076b748fb3e2659d2497 Reviewed-on: https://gerrit.libreoffice.org/77944 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-13tdf#42949 Fix IWYU warnings in vcl/inc/*Gabor Kelemen
Platform-specific subdirs are left alone: android, ios, osx, quartz, win Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Icbb906b7fbc960240c73c56d3dae2a78b06a0f53 Reviewed-on: https://gerrit.libreoffice.org/73754 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-06-11tdf#125591 DOC import: lazy-load metafiles with explicit sizeMiklos Vajna
Regression from commit 69b62cfcbd364d7f62142149c2f690104b217ca1 (tdf#125281 DOC import: fix size of lazy-loaded metafiles, 2019-05-27), the problem is that setting the preferred size of a Graphic swaps it in. Avoid this by extending ImportUnloadedGraphic(): if a size hint is provided, then that will be used instead of info from the graphic descriptor (which is usually only meaningful for bitmaps). This way we maintain the correct size and we're back to lazy-loading metafiles from binary MSO files as well. Change-Id: Ide12d12166110e98ea47b5347dd24fb203b22da3 Reviewed-on: https://gerrit.libreoffice.org/73798 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins