summaryrefslogtreecommitdiff
path: root/svtools
AgeCommit message (Collapse)Author
2014-11-22fdo#86573: Impress does not show pictures anymoreZolnai Tamás
Regression from: 286e2f5c6ec829bc0987b1be7016699f7ef03e5e Sometimes SdrGrafObj import the image file just as a preview (with low resolution) and late when the real picture is needed it just throws this preview and tries to load the image again. This preview works only with package URL so in this case we should not forget that URL. Plus two other related potential image loss situation: - SetUserData() is called with empty image URL - Image preview is thrown when we actually have no package URL from we can import the image again. Change-Id: Ib21f400eb6d28133e8598e6b201209e5dd1a976f
2014-11-21coverity#1255389 Dereference null return valueCaolán McNamara
Change-Id: I3b2a4e69a1c86d9b9ce9f51d6f321bda9e18f8b5
2014-11-21Don't use a hard coded limit for size based auto swap out.Zolnai Tamás
Now the graphic cache settings shows the real memory usage for the users, so we can bequeth the decision of the limit to them. Default is 200 MB. See also: dbdacc73ae154237314d599194cc686bd738a9bf Change-Id: I463d31254f6f1836e1584d5acd692f38a97bfe39
2014-11-21maDocFileURLStr is always emptyZolnai Tamás
Change-Id: I34c4a44d4fbe8d721a3a0bda5dbe35c68fe15c13
2014-11-20Dispose document when doneStephan Bergmann
Change-Id: I7b15220568717e159f119e79da0016cbc88873cf
2014-11-18cppuhelper: clean up public headers with include-what-you-useMichael Stahl
Change-Id: I41ba46831f24b2960a1fe982b74a2b623e682e0b
2014-11-18Missing parenthesesZolnai Tamás
Change-Id: Id6c096d09b984039d54a1d152cf0da594aaf203d
2014-11-18This test become unreferenced by accidentZolnai Tamás
See: c454a0cd0cc7b315b1353b151a2e95654df72c69 and 46eb0952f1e2d75b427bdcd553c33027f1e44e8f Change-Id: I811f1c52f8a9fba28bc4f38fd1ad34826b2bd45e
2014-11-18Fix broken GraphicObjectTestZolnai Tamás
Change-Id: I3f7e0ccd5697a4ca6026bec60210e24af25fb92f
2014-11-18Be precise here, maximum value means it is still allowed to haveZolnai Tamás
Change-Id: I90c559c59b307aac6f7adac49ea38b0d9b68ad58
2014-11-18Be honest about the maximum cache sizeZolnai Tamás
Implementation uses a multiplicator of ten. I guess the intention here was that to calculate cache size based on the size of the inserted images and not based on the real memory usage (potentionally more instances of one image), which seems a bad idea because it covers the real memory usage from the users (who will be suprised when LO's memory usage increases tenfold of the set value). It seems better to use the exact value in the implementation and increase the default value on the user interface instead. Change-Id: Ie3c0568d3518922d3a9931f894eebb9e7e5515ed
2014-11-17loplugin:unreffunStephan Bergmann
Change-Id: Ifc7377fe1bb68b21e462818248706f53347b39b1
2014-11-17WaE: unused variablesTor Lillqvist
Change-Id: I82570a716a0dba6c466bc754ce66ac53e7c17efa
2014-11-17WaE: Unreferenced function definition [loplugin:unreffun]Tor Lillqvist
Change-Id: I55d6d1d403622e5ec04c29dd407274cf9db20c40
2014-11-17sal: clean up public headers with include-what-you-useMichael Stahl
Sadly cannot forward declare "struct {...} TimeValue;". rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h was painful enough for now... Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
2014-11-17"#pragma hdrstop" looks quite obsoleteMichael Stahl
Change-Id: Id4b01f02d5d90215164c07b8076498df65978fa3
2014-11-16Test for size based auto swap out mechanismZolnai Tamás
Change-Id: Iff0942b9b545f27dd74b73bee3f8ac785539867d
2014-11-16vcl: let the ModalDialog ctor take an OUStringMiklos Vajna
Change-Id: I839435338f4acf80c40896b6c86f7ef122f5449d
2014-11-14coverity#1242527 Arguments in wrong orderCaolán McNamara
doesn't seem to matter too much, I guess its only the top left corner that really matters for tooltips. This is the vertical scrollbar as used in e.g. writer->view->datasources Change-Id: I5bd6e563a9f02edae9ca166f073556c55878826c
2014-11-14fdo#86023 - O[U]String needs a 'clear' methodBrij Mohan Lal Srivastava
Added clear() method to OString and OUString class, Updated appropriate call-sites. Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-11-14vcl: move the Impl class of MapMode ...uhm... out of the public header?Michael Stahl
And remove the tools/fract.hxx include. grep -l -r fract.hxx workdir/Dep/*Object* |wc -l before: 4569 after: 1851 Shrinks some libraries, example from --enable-dbgutil Fedora gcc 4.8.3: libvcllo.so by 473k (0.35%) libswlo.so by ~1Mb (sadly that is just 0.2%) Change-Id: I09bd025d551a5d2c5528b938a68c6aa5f8f114a0
2014-11-13coverity#1251580 Unchecked return valueCaolán McNamara
Change-Id: I5dcbd2289fc853bad2c0969fb3b202a1e7398a5a
2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959 Reviewed-on: https://gerrit.libreoffice.org/12164 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-11fdo#84938: replace HELPMODE_ constants with enumNoel Grandin
Change-Id: I44be5567e84cdabd8b10771ea37e28b8a88cc23e Reviewed-on: https://gerrit.libreoffice.org/12333 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-09fdo#86050 Let LibreOffice add scrollbars to widgets only when necessaryAdolfo Jayme Barrientos
Change-Id: I1a930a413c071d4d0c8855315dc85339e01b7d9b Reviewed-on: https://gerrit.libreoffice.org/12322 Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2014-11-07fdo#84938: replace MOUSE_ modifier constants with enumNoel Grandin
and make the two categories of constants non-overlapping, we really don't need to risk confusion in order to save 6 bits in a data structure like this. Change-Id: I2251195d8e45ed04e2a89e47ae9c3e52cf0475c0
2014-11-07Update notes about swappingZolnai Tamás
Change-Id: I6b9f5f9c4a0bc87376a469835a50dc2cf598479e
2014-11-07Optimize ImplCheckSizeOfSwappedInGraphics() a bitZolnai Tamás
Store used size as a member so we don't need to recalculate it all the time and no need to use a size map. Change-Id: I1f929c5d3a56f545cef123bda087ecaf8ca0be4a
2014-11-07Why to have this compromise, do that what we say the users we do.Zolnai Tamás
Change-Id: Ia599644ff1f7591ac84bdca988883eaf5860297e
2014-11-07Swapping Graphic is a privilage of GraphicObject.Zolnai Tamás
This means more things: * Graphic won't swap out itself, so those classes which uses Graphic without GraphicObject won't need to deal with swapping. * When a Graphic is queried from GraphicObject the caller won't need to deal with swapping, because GraphicObject swaps it in before return. * GraphicObject will swap in the Graphic always when a swapping dependent data is queried (e.g. whole graphic, transformed graphic or AnimationNotifyHdl) Change-Id: I2bf6e37291ec94146f10aac4a35084682437ed16
2014-11-07Paint background images always via drawinglayerZolnai Tamás
Painting via GraphicObject is obsolete. See fdo#68927 where the problem was the quality of svg graphics, it seems a good idea to extend this improvement to all graphic type. Change-Id: I57a26d4fcfea8e4f666504a90281365e8a9a7e1d
2014-11-07Remove these useless static bool variables.Zolnai Tamás
Change-Id: I7a8ad7814231f129d5d1146ceb36eb2c22b2aff1
2014-11-07Ignore the swapped in graphic, but use its sizeZolnai Tamás
Change-Id: I75f17ab5e55119965fcede2b220979cefc1e26ab
2014-11-07Assign graphic data also during auto swap inZolnai Tamás
Change-Id: I09b8d11027f4a1e8470b81677388d4a573b372a6
2014-11-07Avoid an image loss situation of auto swappingZolnai Tamás
Before an image data is used GraphicObject should be swapped in. When a GraphicObject is swapped in auto swapping mechanism is triggered which can swap out some of the images. We should avoid to swap out the same image on which the swap in method was called before because the caller code assumes that the image data is there. Change-Id: Ia4addc370742aea5fbf185cf87e3c062a5ebf5be
2014-11-07Make SetSwapState() an internal methodZolnai Tamás
So we can be sure it is always called when user data changed. Change-Id: If107907afffb85a7a57817f5807847a5c028416c
2014-11-07Avoid using null pointer as a special indicatorZolnai Tamás
When ImpGraphic::ImplSwapOut() is called with null pointer it was assumed that it is becase the graphic is a link and so we don't need to swap out it actually (we can load it anytime using the link), only clear the graphic's internal data. The problem with that it can happen that ImplSwapOut() is called with null pointer accidentally on a non-link graphic object which leads to that we loose the graphic. Seems more robust to use an explicit indicator (GRFMGR_AUTOSWAPSTREAM_LINK) for links swapout. indicator Change-Id: Icf31524a192c7866278ba6a13eb85648aa69f554
2014-11-07Always call ImplAfterDataChange() when data is changedZolnai Tamás
Call it inside ImplAssignGraphicData() which assign GraphicObject members using Graphic's data. With that ImplAfterDataChange() method also called in constructors. It's important to call ImplAfterDataChange(), because this will trigger the auto swaping mechanism. Change-Id: I45af91f8df2fb5b0143fcc5eb05e82e4d408d0bc
2014-11-06Revert "use the new OUString::fromUtf8 method"Stephan Bergmann
This reverts commit 05050cdb23de586870bf479a9df5ced06828d498, not all places that use e.g. OStringToOUString to convert potential UTF-8 are guaranteed to fulfil the prerequisites necessary to use fromUtf8 (and some places like e.g. in codemaker are happy with the best-effort effect of OStringToOUString's OSTRING_TO_OUSTRING_CVTFLAGS).
2014-11-06coverity#1242570 Untrusted value as argumentCaolán McNamara
Change-Id: Ic79bd1931ee291746b6dae138b3181d4baddbe3e
2014-11-06use the new OUString::fromUtf8 methodNoel Grandin
Change-Id: I771004b7ccab3344a67e827e45bc34c22ffa5f77
2014-11-05markup with event type not checker typeCaolán McNamara
Change-Id: I14c0c5d90b67000cb4fe9e6be647854abfe784da
2014-11-05coverity#737920 Uncaught exceptionCaolán McNamara
Change-Id: I282b874c22c373e078007a29bcbbe74b175a70d3
2014-11-05fdo#60906 - Make color configuration consistentIoan Radu
Sinchronize colors from colorcfg.cxx with settings.cxx Change-Id: If3a9c7ac2593e5a452a57590189ad787b807b83c Reviewed-on: https://gerrit.libreoffice.org/12199 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-05fdo#38835 strip out OUString globalsNoel Grandin
they are largely unnecessary these days, since our OUString infrastructure gained optimised handling for static char constants. Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
2014-11-04coverity#1242516 reorg to silence Arguments in wrong orderCaolán McNamara
Change-Id: I0d7a93461f37d5ca18605cd94b630d70d871adfb
2014-11-03coverity#1250408 Division or modulo by float zeroCaolán McNamara
Change-Id: I64c0d1cb4c3182c03a7d7660c4736f665fc5f3dc
2014-11-01coverity#1250406 Division or modulo by float zeroCaolán McNamara
and coverity#1250407 Division or modulo by float zero coverity#1250408 Division or modulo by float zero Change-Id: I77e4483356f7c0b287a29637cf6b958ee665ffec
2014-11-01fdo#84938: replace MIB_ constants with enumNoel Grandin
Change-Id: I58c1b4c9e4c4b3751b233d2fe10b9c953b945c4a Reviewed-on: https://gerrit.libreoffice.org/12179 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-31convert COMMAND_WHEEL constants to an enumNoel Grandin
Change-Id: I413d821a984ab556bd19c52704c04de6d828f699