summaryrefslogtreecommitdiffstats
path: root/canvas
Commit message (Collapse)AuthorAgeFilesLines
* Remove excess newlinesChris Sherlock2016-02-097-9/+0
| | | | | | | | | | | | | | | | | | | A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
* vcl: bmpacc.hxx -> bitmapaccess.hxxChris Sherlock2016-02-069-9/+9
| | | | Change-Id: I4bb19d6103c4a6a902d86b62a857e3478493924c
* vcl: rename EXC_* constants to EXCEPTION_*, EXC is too much like 'execute'Chris Sherlock2016-02-061-2/+2
| | | | Change-Id: I2f79e0419b27391cc9bdc45576e67eecdbc9efa4
* vcl: take into account the font width is the average font widthChris Sherlock2016-02-049-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | I'm changing the Font class function names: - SetSize -> SetFontSize - GetSize -> GetFontSize - SetHeight -> SetFontHeight - GetHeight -> GetFontHeight - SetWidth -> SetAverageFontWidth - GetWidth -> GetAverageFontWidth That's because it really makes no sense to say that there is a single constant font width because obviously proportional fonts don't have one - the best we can do is an average font width, which is what folks like Microsoft sort of do already. On a fixed font, the average is still accurate, for obvious reasons :-) I'm also not a fan of GetSize/SetSize as I find it a might too generic. Change-Id: Ib80a604ba62d6883fd6cbc7994da763976be5c70 Reviewed-on: https://gerrit.libreoffice.org/22069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
* Remove leftover printf-style %fTor Lillqvist2016-02-021-1/+1
| | | | | | | | | | | | But seriously, who builds with OSL_DEBUG_LEVEL > 2? Either debugging printouts inside such ifdefs are completely pointless and should be removed, or then the information might actually be useful, and the ifdefs should be removed, so that the information can be selected to be printed using the normal SAL_LOG environment variable mechanism (in a build where SAL_INFO is functional). Change-Id: Ia5d2c7c7b525ed133fe3f077a005f583b8a856e7
* tdf#43157: Fix format string violations in OSL_TRACE etc.aybuke2016-02-022-3/+3
| | | | | | | Change-Id: Idffbfb78b2386020fd099077a67bf8a89917bdab Reviewed-on: https://gerrit.libreoffice.org/21999 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* boost::tuple -> std::tupleCaolán McNamara2016-01-313-9/+8
| | | | | | | Change-Id: Ia08c184b792ff73d3ed49d6a5d54dec1a35943e9 Reviewed-on: https://gerrit.libreoffice.org/21955 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* vcl: add text alignment functions to ImplFont and FontAttributesChris Sherlock2016-01-294-5/+5
| | | | | | | | | | | | | | | | | ImplFont and FontAttributes now have GetAlignment and SetAlignment, and I have renamed Font::GetAlign to Font::GetAlignment, and Font::SetAlign to Font::SetAlignment. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit test added to vcl/qa/cppunit/font.cxx to test text alignment. Change-Id: I6272c84fc9416c90616d957d1897eba9469fe7ba Reviewed-on: https://gerrit.libreoffice.org/21876 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
* canvas: replace BOOST_CURRENT_FUNCTION with OSL_THIS_FUNCMichael Stahl2016-01-284-5/+5
| | | | | | | Change-Id: Ib90ad48866718f69160f57e7b0db3a7f342eb7be Reviewed-on: https://gerrit.libreoffice.org/21882 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
* Revert "canvas: replace BOOST_CURRENT_FUNCTION with __func__"Michael Stahl2016-01-284-5/+5
| | | | | | | | | | | | This reverts commit d01f7db4b5f51d1be8ba210625f4ad1ebf5c6e8f. Revert "tools: replace BOOST_CURRENT_FUNCTION with __func__" This reverts commit 10303054067258016fbbae018ea848f74adc4964. Surprisingly MSVC 2013 does not support __func__ - need 2015. Change-Id: I7084d7b79784b34a8f40fb986d10ffefbabae7fb
* canvas: replace BOOST_CURRENT_FUNCTION with __func__Michael Stahl2016-01-284-5/+5
| | | | Change-Id: I384472894288081423ae9467cc439b10d637f6e0
* loplugin: unused return valuesNoel Grandin2016-01-212-2/+2
| | | | | | | Change-Id: I4eb1f0c9245c04058fd5e47046f043f8840a79c7 Reviewed-on: https://gerrit.libreoffice.org/21628 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* vcl: rename Font::GetName to Font::GetFamilyNameChris Sherlock2016-01-171-1/+1
| | | | | | | Change-Id: Ie20871a3078bf875c1782b7761d60591a9c9704f Reviewed-on: https://gerrit.libreoffice.org/21529 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
* revert vcl patch series that brok Mac and WindowsNorbert Thiebaud2016-01-161-1/+1
| | | | | | | | | | | | | | | | | | revert: 9bc2f3de8672e812f3a67541c6d7069b434a7e42 vcl: add comment about ImplFontMetric::{Get|Set}LineHeight() 26371f105bc44e04469ec03fc5bb12505e651c6b vcl: FontAttributes::GetSlantType() -> FontAttributes::GetItalic() 2dd0b4317372b8022efe3911b38b4fa02956d8b9 vcl: font.hxx and metric.hxx cleanup, make ctors explicit and the dtor virtual 5ab13bf3ead3539e4ad847656da81e7eb6029652 vcl: tabify font.hxx f99550dae55e40e49bf9c9875053fe2abb4c71ca vcl: change Font::SetName() to Font::SetFamilyName() 2b297116cb6bb1061c43e5714e2609c8ee9f57d2 vcl: rename Font::GetName to Font::GetFamilyName Change-Id: I23f38921187d66b970ca815eb30dda4222a2da62
* vcl: rename Font::GetName to Font::GetFamilyNameChris Sherlock2016-01-161-1/+1
| | | | | | | Change-Id: I83927e0992dfe0a2a79d139818a9f45d3761aae5 Reviewed-on: https://gerrit.libreoffice.org/21509 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
* vcl: Create accessor and mutator for int and ext leading in FontMetricChris Sherlock2016-01-133-4/+4
| | | | | | | | | | | | | | | | | | | | Accessor and mutator created for external and internal leading space in FontMetric. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit tests - check to ensure that can set external and leading space - check equality operator on FontMetric after setting both external and internal leading space - enhanced tests to also check the inequality operator Change-Id: I973970dd0b0631c5eca3e89039dce57ac3a3eb63 Reviewed-on: https://gerrit.libreoffice.org/21454 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
* Remove useless extra var for loopJulien Nabet2016-01-081-5/+3
| | | | | | | | | Take benefit of returned iterator from erase method Change-Id: I77eaa5b4500cfc66ae66e5f388915e0ade79b23c Reviewed-on: https://gerrit.libreoffice.org/21239 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* cppcheck: noExplicitConstructorCaolán McNamara2016-01-071-1/+1
| | | | | | | | Change-Id: I94db78ca12e0f3389f00ea5c557f0b64d452f613 Reviewed-on: https://gerrit.libreoffice.org/21150 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* new loplugin rangedforcopy - use reference in range based forAndrzej Hunt2016-01-051-1/+1
| | | | | | | | | Inspired by 6e6ae9803796b120e95f6e89575e03c5fd0ed3c2 Change-Id: Ia0f264d3a6bbf076aa5080e3398683e50bc6ef01 Reviewed-on: https://gerrit.libreoffice.org/20190 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Fix typosAndrea Gelmini2016-01-054-5/+5
| | | | | | | Change-Id: I1b79005d9c4e32325b8dadcc4f805975d6bf2727 Reviewed-on: https://gerrit.libreoffice.org/21103 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
* Resolves: tdf#93703 0 scaling is CAIRO_STATUS_INVALID_MATRIXCaolán McNamara2015-12-211-5/+8
| | | | | | | | | | so more drawing to the surface fails prior to 4ac876084bb89b6460b31e090a666b395f66b1e8 we had a new cairo context each time to the error was thrown away along with the context and the new one would work Change-Id: I90ab1a943e8908e87f391bdfb8ccd5f3818e13d5
* Use comphelper::containerToSequence()Noel Grandin2015-12-031-3/+3
| | | | Change-Id: I18d6ef04ff00f971a4c54ba259733c07501c6c1a
* Remove unused FMT_R8G8B8Stephan Bergmann2015-12-021-40/+0
| | | | | | | | | ...since 5b4d4af3e8bc3b5fb07bceecefc2a47d8e4b8b18 "bin agg" Change-Id: If86d294f812a670917b181f3bd140883ad2df71d Reviewed-on: https://gerrit.libreoffice.org/20348 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
* C++17 nested namespace definitionStephan Bergmann2015-11-281-1/+3
| | | | Change-Id: I49fd2093d619743d0d5aaaa4784bd5ef5bb330c6
* Unused forward declStephan Bergmann2015-11-281-2/+0
| | | | Change-Id: Id332cdff634be042e026faf7cc75d8eaeb44a13e
* -Werror,-Wunused-functionStephan Bergmann2015-11-281-11/+0
| | | | Change-Id: Ic238339b521dbff2d7fbe899127ac7954036300f
* -Werror,-Wunused-private-fieldStephan Bergmann2015-11-281-6/+2
| | | | Change-Id: Ie14d3b3474b7886add80bd6e223e76fbf964144e
* -Werror,-WreorderStephan Bergmann2015-11-281-2/+2
| | | | Change-Id: I27eb5c497985267dd00b5be2fb3c17f8d79745cf
* -Werror,-WreorderStephan Bergmann2015-11-281-2/+2
| | | | Change-Id: I0a3384505d8ab7fe70c0dccb93a96d9d3e991367
* -Werror,-Wunused-functionStephan Bergmann2015-11-281-21/+0
| | | | Change-Id: I99246a9de5f266154f9927bff322a0a1697bcdee
* -Werror,-Winconsistent-missing-overrideStephan Bergmann2015-11-284-18/+18
| | | | Change-Id: I41d1e0d5e6263255426efb011c7b4bb5ae6775b5
* expression result unused [-Werror,-Wunused-value]Noel Grandin2015-11-261-1/+1
| | | | Change-Id: I57b44c1997ac286fcb4caf8e3027e3b5996fc377
* loplugin:unusedfields variousNoel Grandin2015-11-251-3/+1
| | | | Change-Id: I59d9f7f73677358b4ae57efda965d43718bdf0d5
* VirtualDevices either match another device depth, or are 1 bitCaolán McNamara2015-11-233-4/+4
| | | | | | | cairo can therefore always render to a svp virtual device with need for a fallback Change-Id: I5d03ae541820389e26f7448444444be009fb28a4
* establish that Virtual Devices either match Physical Device depth or ...Caolán McNamara2015-11-233-16/+16
| | | | | | are 1 or (rarely) 8 bit and lock that down. Change-Id: I3d946ebef34ffb71c5adea7aa420af50e9584e05
* Adapt Windows-only codeStephan Bergmann2015-11-202-4/+6
| | | | | | | ...to b8793748b0eaaa3fe405587fcb2a3021adab833b "Seems more natural to pass a homogenous list by initializer_list" Change-Id: I1c6816a442b57572a307251de1de5652a9d2a63a
* loplugin:unusedfields in canvasNoel Grandin2015-11-201-3/+1
| | | | | | | Change-Id: Ic532ebf1f929044d72ee3abca29c8275cbe837ac Reviewed-on: https://gerrit.libreoffice.org/20078 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* Seems more natural to pass a homogenous list by initializer_listStephan Bergmann2015-11-204-8/+10
| | | | | | | ...than by template parameter pack (even if that requires using ServiceDecl*, as initializer_list cannot take reference types) Change-Id: Ia986201b52d8daedfe925f132ebc79bc2c0ba378
* loplugin:sallogareasStephan Bergmann2015-11-201-1/+1
| | | | Change-Id: Ib1f06cb5f925535858bc14aab6f59ad7fd2a3a8d
* use initialiser for Sequence<OUString>Noel Grandin2015-11-151-2/+1
| | | | | | | | | | | | | performed using: git grep -lP 'Sequence.*OUString.*\(1\)' | xargs perl -0777 -pi -e "s/Sequence<OUString> (\w+)\(1\); .*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g" Change-Id: I4da56c80fa09bfc1e8f868794001e9921431e09f Reviewed-on: https://gerrit.libreoffice.org/19968 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* use initialiser syntax for Sequence<OUString>Noel Grandin2015-11-1515-32/+16
| | | | | | | | | | | | | | replaced using the script: git grep -lP 'Sequence.*OUString.*\(1\)' | xargs perl -0777 -pi -e "s/Sequence< OUString > (\w+)\(1\); .*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g" Change-Id: I23688a91562051a8eed11fc2a85599545c285c34 Reviewed-on: https://gerrit.libreoffice.org/19967 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* Windows header sanitizationAshod Nakashian2015-11-121-19/+2
| | | | | | | | | | | | | | | | Isolation of windows headers using prewin.h and postwin.h headers and making headers dependent on them more self contained. Conversion of TCHAR to WCHAR and LPCTSTR to LPCWSTR etc. and cleanup of unnecessary casts. Change-Id: I7eff5c477d9223a064bfb4d962ff6d61960ee69c Reviewed-on: https://gerrit.libreoffice.org/19901 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* Bin mesa_headers completelyTor Lillqvist2015-11-121-1/+0
| | | | | | We don't need them in a MSVC or OS X compilation either. Change-Id: I00181fe0a047df09bbdfcce34c07eb2ebc45a2da
* Avoid mesa_headers on X11, also link with -lGL only where necesssaryTor Lillqvist2015-11-121-1/+1
| | | | | | | | | | | | The GLEW headers are enough, and what we actually use in these places. In addition to handling GL extension things in its dynamic fashion, GLEW headers also have declarations for standard, non-extension, OpenGL API, including xgl and wgl ones. Most likely we don't need mesa_headers on Windows or OS X either, and can drop them completely. Change-Id: Ic0d8d6238c862f8fe4a74e99e95344dcbf540980
* loplugin:nullptr (automatic rewrite)Stephan Bergmann2015-11-1028-119/+119
| | | | Change-Id: I9e064592c4ee18a600aadfa20b3c89ecafc818d4
* loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)Stephan Bergmann2015-11-061-3/+3
| | | | Change-Id: I72cad7217bdfc2a1f3339c604ea4dc55ff661e2a
* Replaced boost::bind by std::bind in canvas/source/opengl/ogl_canvashelper.cxxMario J. Rugiero2015-11-021-12/+11
| | | | | | | | | | Chose not to use lambdas instead because the number of arguments in these calls would have made it way too verbose, hurting readability. Change-Id: I8662a937ec10ca0fac6cd7e0d78b6268e8023ada Reviewed-on: https://gerrit.libreoffice.org/19707 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
* Partial revert 'for_each -> range-based'Thorsten Behrens2015-11-021-3/+4
| | | | | | | | | There was a subtle change in semantics, the earlier loop was only iterating until aEnd, covering only unique elements of the vector. This partially reverts commit c04fd82433e9155ad61ebd92ca7b43a729a87890 Change-Id: I75c5f1b343c3fa8855f6d7f8f706b9259bc9f6df
* boost::bind -> lambdas in canvas/source/simplecanvas/simplecanvasimpl.cxxMario J. Rugiero2015-11-011-10/+5
| | | | | | | Change-Id: If768595d3c3ec294d5a59ad42f26aacfd6e0fda3 Reviewed-on: https://gerrit.libreoffice.org/19708 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* boost::bind -> lambdas in canvas/source/vcl subtreeMario J. Rugiero2015-11-012-16/+7
| | | | | | | Change-Id: I2b2e746197b94222c73b78379d64086adfb5e693 Reviewed-on: https://gerrit.libreoffice.org/19712 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>