summaryrefslogtreecommitdiff
path: root/vcl/source/bitmap
AgeCommit message (Collapse)Author
2017-12-18tdf#97228 Move include file include/vcl/BitmapProcessor.hxx to vcl/inc/abdulwd
Adapt users, all in vcl, accordingly. Change-Id: I4531840091da73fa8fc29175407fa8a737deac18 Reviewed-on: https://gerrit.libreoffice.org/32442 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit e61fe745d12055ee3915a957714772eeb46fdcd3) (cherry picked from commit 85a40facb074366cd06b226077f83e713d0c421c)
2017-12-18convert INetURLObject::EncodeMechanism to scoped enumNoel Grandin
(cherry picked from commit 803215142efa6437515348f63bd70ffdcf5d45f1) (cherry picked from commit 736cd289d4cdb0db61d92134bcc9d48aa7e79613) Change-Id: I50ea17c7779c7b5cacddf548f1773fd7d6c8bade
2017-12-05remove UL/L suffixes from integer constants on the RHS of expressionsNoel Grandin
Reviewed-on: https://gerrit.libreoffice.org/41237 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 2e8acde112e1c6754df26902e79a78346ba45a2d) Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5 Reviewed-on: https://gerrit.libreoffice.org/45452 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 2887aefa4d4f60ba8b0cd7efd5d3a73ffb209781)
2017-12-05remove UL/L suffixes from shift-by-constant expressionsNoel Grandin
Change-Id: Ia470f643e3eefeccc14183133603db260460bd53 Reviewed-on: https://gerrit.libreoffice.org/41212 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 224b770fa77fe12ad5dc543ce020aca316b6558d) (cherry picked from commit 58c171983d4f828d36bf1f6d8fb8329e69424c7e)
2017-12-05BitmapFilter, BitmapScaleSuper only used within vclStephan Bergmann
Change-Id: Ia8a1207a584b599f01c47b658692d3eeae52cb3a (cherry picked from commit 4f7280e4cc34a284b91473cefcb179f04a1d7a08) (cherry picked from commit e95d95d6c774dc2772d039affa7e51e06b8efec2)
2017-12-05Extend ScopedBitmapAccess and modify various classes to use itMark Page
Exception safety, ensure the Access classes are always destroyed. Change-Id: I4889358476267853ffbd7fafc24950d84b4e9331 Reviewed-on: https://gerrit.libreoffice.org/31494 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 677246466c471fbe3522c35be3639afa008a46c0) (cherry picked from commit 73abf54b775d9162fdfc27ad2649de774dd7e0d1)
2016-12-19vcl: separate ImplImageTree - ImageTree singleton and public ifaceTomaž Vajngerl
ImplImageTree was used outside of VCL which is not consistent with the name and the header also contains a lot of implementation detail. This separates the implementation to ImplImageTree and the public interface and singleton to ImageTree only. Change-Id: I3a26444f0f6971a6b1d83472e9cef19c93192d3e Reviewed-on: https://gerrit.libreoffice.org/32134 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit bf5f6df9e47bd31dc052c6411f6f88ec2d4e3cea) Reviewed-on: https://gerrit.libreoffice.org/32165
2016-12-14split markers for galaxy theme, when scaling use splitted markersTomaž Vajngerl
For markers (resize markers, anchors,...) we contain them all in one image atlas. This was generally done because of resource limitiations in Windows 95/98 which aren't a problem anymore in present systems. This is however problematic in HiDPI as we scale the image and the coordinates of aren't correct anymore. Another problem is that it uses its own cache instead of common cache in ImplImageTree. So this commit extracts all the markers into its own images for galaxy theme and uses them when we scale. In the future when we extracted all the markers to its own images for all icon themes we can remvoe the old code with the image atlas. Change-Id: Ibee181b529d30e20050df8cd396d338bd53532c0 (cherry picked from commit 681c2c3f59863d1f2d0123a92ee63baf84e18dfc) Reviewed-on: https://gerrit.libreoffice.org/31960 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-30tdf#95014 initial support for 32 px icons in toolbarTomaž Vajngerl
This adds support for 32 pixel icons - mainly to get them into the toolbar. Most changes made are to change the behavior of having only small and large icons as a boolean choice, but not every code path was converted to non-boolean choice yet. Breeze icon theme has the 32px variants so it can be used already. Change-Id: Iadf832a87826c16b3a83522104dd6c35d61a0f87 Reviewed-on: https://gerrit.libreoffice.org/30398 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29vcl: add bitmap::loadFromResource with additional flagsTomaž Vajngerl
Sometimes we want to surpress automatic scaling and converting for dark theme. This adds a loadFromResource function with additional flags which makes this possible. Change-Id: I893cee82ad6942644755f0c5b772fb5f073bbf00 Reviewed-on: https://gerrit.libreoffice.org/30341 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29tdf#51733 support SVG icon theme, disk cache and scaling / darkenTomaž Vajngerl
Also resolves tdf#92248 This extends icon name resolving so that is in addition tries to find an icon with the "svg" extension and load that instead of stated (mostly "png") extension. If the filename extension is "svg" we load the icon with the SVG filter instead. This also adds icon scaling and conversion for HiDPI or when a dark theme is wanted. If the SVG icon is available, we render it at a higher resolution instead of scaling As loading of SVG icons can be computatunally expensive, a icon disk cache was added. This saves the rendered SVG as a PNG image into the "cache" folder. The same caching is also used for HiDPI and dark theme converted icons so we don't always scale or convert the icons. In addition some style changes and DRY fixes were made to the ImplImageTree source code. Change-Id: I9e421395a342ffe8da9facea7ea06e5db2778b26 Reviewed-on: https://gerrit.libreoffice.org/30339 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-09-15replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)Michael Stahl
... except in include/rtl, include/sal, include/uno, where sal_Size is retained for compatibility, and where callers of rtl functions pass in pointers that are incompatible on MSVC. Change-Id: I8344453780689f5120ba0870e44965b6d292450c
2016-07-18add tagging to ThreadTasks so we don't need more one poolNoel Grandin
If more than one place in the code submits tasks to the shared pool, then waitTillDone() becomes unreliable. Add a tagging mechanism, so different callsites can wait on different sets of tasks. Also try to protect our worker threads against exceptions from the thread tasks code. Change-Id: Idde664ab50008d31a2dd73910bb22f50e62ae22f Reviewed-on: https://gerrit.libreoffice.org/27042 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-10making a disabled image from a 1 bit depth icon gives index assertsCaolán McNamara
cause the disabled color cannot be mapped to the 2 entries in the palette, so use 8bit dests if the src is 1bit regression from commit 507d0ded64db51a8826d07c507f612a6c02c3869 Author: Caolán McNamara <caolanm@redhat.com> Date: Tue Dec 1 12:18:57 2015 +0000 keep disable image at same depth as original seen when clicking on the image loaded from tdf#100632 Change-Id: Ic69bccfa0fc86707b4fd9e757d8374d80e4b0071
2016-06-06tools: rename SvStream::Read/Write to ReadBytes/WriteBytesMichael Stahl
Change-Id: Ib788a30d413436aa03f813aa2fddcbc4d6cd2f9a Reviewed-on: https://gerrit.libreoffice.org/25972 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-25Convert BMP_FORMAT to scoped enumNoel Grandin
Change-Id: I751ab762b6e6f961e9e73a8a2ca92a3f5a5eb1c8 Reviewed-on: https://gerrit.libreoffice.org/25189 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-25convert ImageType to scoped enumNoel Grandin
and drop duplicate definition in framework. Change-Id: I6cb95241e659ad58429bffeaaf2f95b07ad12df6 Reviewed-on: https://gerrit.libreoffice.org/25400 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-13clang-tidy modernize-loop-convert in vclNoel Grandin
Change-Id: I79e97a4826bfe3918de223cccf48646a1404f901 Reviewed-on: https://gerrit.libreoffice.org/24922 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-26update loplugin stylepolice to check local pointers varsNoel Grandin
are actually pointer vars. Also convert from regex to normal code, so we can enable this plugin all the time. Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1 Reviewed-on: https://gerrit.libreoffice.org/24391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-26loplugin:unuseddefaultparms in include/vcl (part2)Noel Grandin
including a fix for a rather glaring bug in BitmapTools.cxx Change-Id: Id9db990b993cfeea9039c5fbaaa91996adeae22a Reviewed-on: https://gerrit.libreoffice.org/22713 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-06vcl: bmpacc.hxx -> bitmapaccess.hxxChris Sherlock
Change-Id: I4bb19d6103c4a6a902d86b62a857e3478493924c
2016-01-11Remove BitmapFilterStackBlur, which is unused...Stephan Bergmann
...ever since it got introduced with 28c61871e876e6a2cac47439f768504b1a4c94a0 "vcl: stack blur implementation + basic test & performance test" Change-Id: I78672cf74c24930df92121baecb9886df4382036
2016-01-10Fix typosAndrea Gelmini
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-11vcl: extract scale convolution from bitmap to its own class/fileTomaž Vajngerl
Change-Id: Ibb10aa7450b78ca2709da38857f095ccbc679c54
2015-12-10tdf#96357 Switching icon theme doesn't update toolbar or statusbarMaxim Monastirsky
Regression of 6480b4d11a0cf2dd489d30b6290aa6d831704a45 Change-Id: I00141b3d9c5ea8dc813530a2ee095d61a35b3c04 Reviewed-on: https://gerrit.libreoffice.org/20591 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2015-12-02keep disable image at same depth as originalCaolán McNamara
that way the "preferred" image format for a platform for icons etc remains sticky Change-Id: Ia76af0b7c4f27650038cab214b6406b8ef1a5fc4
2015-11-23loplugin:loopvartoosmallNoel Grandin
Change-Id: I2aca12b994c2fd260803a8897b968ddac848f235
2015-11-23vcl: add colorizeImage to BitmapProcessorTomaž Vajngerl
Change-Id: Ic90368e83d7f9a187eb8404d8aaec4380ff5bcb1
2015-11-23vcl: Bitmap processor to create a disabled imageTomaž Vajngerl
Change-Id: Iba5d86988736fa28329e1ba2783dfb15e37815a8
2015-11-19move translating a command name to image name out of frameworkTomaž Vajngerl
This is the first step to decouple resolving of command names to image (icon) names. This is necessary to make allow additional processing of images before the image is passed on and better decision which image source to take. Change-Id: I129dc6a1ae812aaaca32696ef2a2749d5fa86a54
2015-11-08Leftover debug code? (causes -Werror,-Wformat)Stephan Bergmann
Change-Id: I8629481a454a668b3044eb6f56dbe43d4720e52a
2015-11-08support to load SVG images when loading from Image resourceTomaž Vajngerl
Change-Id: Ieda1c334d8d995c774381c52fa1d9aa11751c5ef
2015-10-27loplugin:unusedmethodsNoel Grandin
Change-Id: I161cd52606c11b6008f5d8b1d8ee391692f91861 Reviewed-on: https://gerrit.libreoffice.org/19231 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12loplugin:loopvartoosmallStephan Bergmann
Change-Id: Ic3667c0daeeeb5b09eeaae66899affda65e2e9a5
2015-10-12vcl: recolor images (icons) to be more visible in a dark themeTomaž Vajngerl
This adds recoloring of images/icons (suited for breeze and sifr) so they are more visible when a dark theme is used (for example gtk3 can switch to a dark theme). LO must be started with environment variable VCL_ICONS_FOR_DARK_THEME set to 1. open issues - currently all images/icons are recolored but not all images should get recolored. Change-Id: Ibc42e30af79bb4c4f04c67b760019311b97b2cc6
2015-09-29Renamed wrongly prefixed boolean variablesStefan Heinemann
Fixed tdf#94269 Change-Id: I63109cc4e095bad680d7637a065080ea368860ae Reviewed-on: https://gerrit.libreoffice.org/18851 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-09-01Removed the crc table from the check-sum headerMarco Cecchetti
Now can be accessed through the vcl_get_crc64_table() function Change-Id: Ife85dde373a48652a0d67460184c1f325eb91702
2015-09-01moved chechsum.hxx in include/vclMarco Cecchetti
Change-Id: I70f82f16d5907ce0bbe2d838c4acee226886aab2
2015-09-01Added support for computing 64-bit checksum of bitmap in OpenGLMarco Cecchetti
Added a C++ and a GLSL implementation of a 64-bit CRC algorithm. Changed hardcoded checksum value in ooxmlimport unit test (testN777345). Change-Id: I16bb985a14866775efda49e21fe033ff64645896
2015-06-17Replace boost::scoped_array<T> with std::unique_ptr<T[]>Takeshi Abe
This may reduce some degree of dependency on boost. Done by running a script like: git grep -l '#include *.boost/scoped_array.hpp.' \ | xargs sed -i -e 's@#include *.boost/scoped_array.hpp.@#include <memory>@' git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \ | xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/' ... and then killing duplicate or unnecessary includes, while changing manually m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx, extensions/source/ole/unoconversionutilities.hxx, and extensions/source/ole/oleobjw.cxx. Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd Reviewed-on: https://gerrit.libreoffice.org/16289 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-05-28new clang plugin: loopvartoosmallNoel Grandin
Idea from bubli - look for loops where the index variable is of such size that it cannot cover the range revealed by examining the length part of the condition. So far, I have only run the plugin up till the VCL module. Also the plugin deliberately excludes anything more complicated than a straightforward incrementing for loop. Change-Id: Ifced18b01c03ea537c64168465ce0b8287a42015
2015-05-25cppcheck: noExplicitConstructorCaolán McNamara
Change-Id: I62076450ab77472bfd09b3fb9824f54b6ea1e0f7
2015-03-27more std::min and std::max fixesNoel Grandin
Change-Id: I4e654419221b39dfd64d85a18ae0919bbe2fab5a
2015-03-27fix std::min issueNoel Grandin
some tinderboxes are complaining with: could not deduce template argument for 'std::initializer_list<_Elem>' from 'int' Change-Id: Ib6bb1c9958a86fd7bb98d5ce855764f381d2ba43
2015-03-27fix tb56 buildNoel Grandin
Change-Id: I453d6e1840445a03c6918173dc93f32e3028ea74 error: no matching function for call to 'max(int, sal_Int32&)'
2015-03-27vcl: stack blur implementation + basic test & performance testTomaž Vajngerl
Change-Id: I793ed80a07d9488c5f75b3abdca6db344d80d3d8
2015-03-27vcl: tests for Bitmap, check for symmetry when scaling bitmapsTomaž Vajngerl
Change-Id: I53d6e70018477abb9f98140a52697c1de0f90934
2015-03-12Another "ancient compiler fix"Jan-Marek Glogowski
AKA fix Ubuntu Precise build... gcc 4.6 isn't able to copy a non-static reference, so convert the reference to a pointer. Change-Id: I222f32f59d44995eb45ccd6eb2dd5f65103b2ce8
2015-03-12loplugin:stringconcatStephan Bergmann
Change-Id: Idbc179459e574fa9bf2537cb215a012c105e0913