summaryrefslogtreecommitdiff
path: root/vcl/source/gdi
AgeCommit message (Collapse)Author
2014-10-17coverity#1209374 avoid division by 0David Tardon
Change-Id: I6728c0f79e0091b88b3269f5b8b25d27c82d9761
2014-10-16fdo#84854 it seems long is not enough on 32 bitDavid Tardon
Fraction used BigInt internally for computations, rational does nothing like that. Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
2014-10-15Resolves: #i63015# always default to WinAnsiEncoding...Herbert Dürr
for non-symbol PDF-Type1 export Suggested-By: edv@gruene.de Reviewed-By: hdu@apache.org (cherry picked from commit b8186703cb43d2b57460cb23a7a4e3f989e95426) Conflicts: vcl/source/gdi/pdfwriter_impl.cxx Change-Id: I02227724bff301133ac8ce5562ec5ca1ed94f136
2014-10-14vcl: warning C4717: GetCharCount() recursive on all control pathsMichael Stahl
Change-Id: Id86dcd2c701510ce15cc2cf71e35c1d908ec6049
2014-10-13valgrind + bff, multiple failures, initialize ref counts to 0...Caolán McNamara
for boost::intrusive_ptr ==6595== Conditional jump or move depends on uninitialised value(s) ==6595== at 0xB21664D: intrusive_ptr_release(FontCharMap*) (metric.hxx:226) ==6595== by 0xB2172F6: boost::intrusive_ptr<FontCharMap>::~intrusive_ptr() (intrusive_ptr.hpp:97) ==6595== by 0xB5AE196: FtFontInfo::GetFontCharMap() (gcach_ftyp.cxx:1287) Change-Id: Iea5ab13b093945c840481f29bc626a16dcbc234b
2014-10-13create a macro library for implementing bit-flags typesNoel Grandin
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, changed from a macro- to a template-based solution. (Unfortunately MSVC 2012 does not support explicit conversion operators. Worked around that with explicit #ifs rather than some HAVE_EXPLICIT_CONVERSION_OPERATORS and SAL_EXPLICIT_CONVERSION_OPERATOR ainticipating we hopefully soon move to a baseline that requires unconditional support for them.) Change-Id: I4a89643b218d247e8e4a861faba458ec6dfe1396
2014-10-13vcl: Make ImplFontCharMap a pImpl and move functions to FontCharMapChris Sherlock
To do this, I've made FontCharMap a friend class for ImplFontCharMap, and have moved the functions directly into FontCharMap. In this patch, I am attempting to stop the direct use of ImplFontCharMap by anything other than FontCharMap. However, FontCharMap itself requires a refcounter, so we will use FontCharMapPtr to access the font character map. Change-Id: I509b990a8cbd911c5cc1572c7d24fc5348ca06d9 Reviewed-on: https://gerrit.libreoffice.org/11823 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-10-10coverity#1244944 experiment to silence Untrusted loop boundCaolán McNamara
there's a warning for nPolygonCount but none for nPointCount. I wonder what happens if I tweak the code like this Change-Id: I7e1b02c4790f6b2d1c59e38de1a6a0b17a0485b1
2014-10-10coverity#1242439 ALPHABITS == nAlphaShift == 8Caolán McNamara
Change-Id: Ifde395113524df03a2523115ab2234403d405455
2014-10-10drop unused ImplBlendLines templateCaolán McNamara
Change-Id: Id680f6031d40f086e74472d14fbf70cbf8cc43a1
2014-10-09fdo#81356: convert Fraction to boost::rational<long> - wipJuan Picca
* Added rational util functions used by Fraction class not available in the boost::rational class. * Replaced usage of Fraction by boost::rational<long> * Removed code that relies on: 1. fraction.IsValid() -- rational only allow valid values, ie denominator() != 0 2. rational.denominator() == 0 -- always false 3. rational.denominator() < 0 -- always false but implementation detail: http://www.boost.org/doc/libs/release/libs/rational/rational.html#Internal%20representation * Simplified code that relies on: 1. rational.denominator() != 0 -- always true * BUGS EXIST because Fraction allows the creation of invalid values but boost::rational throws the exception boost::bad_rational Change-Id: I84970a4956afb3f91ac0c8f726547466319420f9 Reviewed-on: https://gerrit.libreoffice.org/11551 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-10-08coverity#704183 Resource leak in objectCaolán McNamara
Change-Id: I64b995c15a83d71aaa6745323141e71cc55cf000
2014-10-08coverity#1066165 Resource leakCaolán McNamara
no close on error paths Change-Id: Ie544bcd6ea7224bee2a092013a589c509d42c735
2014-10-06WaE: implicit conversion of NULL constant to 'nullptr_t'Tor Lillqvist
Change-Id: I93b22ce863294312d323184afdfe46f5a448375e
2014-10-06vcl: FontCharMap to use intrusive_ptr ImplFontCharMapChris Sherlock
ImplFontCharMap was using it's own reference counting mechanism, however we can use intrusive_ptr more effectively. Added a unit test around FontCharMap. Change-Id: Ifab6ce002fd1df8feb7e017dea3012ff9ea7f18a Reviewed-on: https://gerrit.libreoffice.org/11804 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-10-05coverity#1208996 Unchecked return valueNorbert Thiebaud
Change-Id: I02e79ddeefa3961ab7adeb71fbc57bfd0cbe02a8
2014-10-04vcl: remove FontRefCount typedefChris Sherlock
There is honestly no real need for FontRefCount. I really cannot see why this typedef was ever introduced into the codebase Change-Id: Ifa24a95cf6c788b4b11a4425520a2f6bc0e61169
2014-10-03coverity#1093225 Dereference after null checkCaolán McNamara
Change-Id: I34a7b79b4a7b5d86c3d39fd995ed3bd998eeeab8
2014-10-02coverity#1242507 silence Arguments in wrong orderCaolán McNamara
Change-Id: Ice857b6f97f1ac3f720226aa90392fb6e9229869
2014-09-30fdo#82577: Handle PolyPolygonNoel Grandin
Put the TOOLS PolyPolygon class in the tools namespace. Avoids clash with the Windows PolyPolygon typedef. Change-Id: I811ecbb3d55ba4ce66e4555a8586f60fcd57fb66
2014-09-30fdo#82577: Handle RegionNoel Grandin
Put the VCL Region class in the vcl namespace. Avoids clash with the X11 Region typedef. Change-Id: I6e008111df7cf37121fbc3eaabd44a8306338291
2014-09-29loplugin: cstylecastNoel Grandin
Change-Id: I58ec00d6f8a4cc6188877db1330c5e32c9db12e5
2014-09-26vcl: restore that cast for MSVCMichael Stahl
Change-Id: I8a8b4b16811660290c881f82b3cf9b910d054215
2014-09-26remove unnecessary casts in calls to SvStream.WriteUInt32Noel Grandin
left over from our conversion of the SvStream output operators to more specific methods Change-Id: I1d848f19f82783e6eabf2da37dbde78fe36ea1e0
2014-09-26remove unnecessary casts in calls to SvStream.WriteInt32Noel Grandin
left over from our conversion of the SvStream output operators to more specific methods Change-Id: I0c0172519479be0535a447e41a592fbf782751bd
2014-09-26remove unnecessary casts in calls to SvStream.WriteUInt16Noel Grandin
left over from our conversion of the SvStream output operators to more specific methods Change-Id: I482ca7abb84613971e7e8f839f7aa67a65cd71ff
2014-09-26remove unnecessary casts in calls to SvStream.WriteInt16Noel Grandin
left over from our conversion of the SvStream output operators to more specific methods Change-Id: Ie44bec6b988f3e46fe78d14b740818c9141f5df0
2014-09-26remove unnecessary casts in calls to SvStream.WriteUCharNoel Grandin
left over from our conversion of the SvStream output operators to more specific methods Change-Id: I2ea4c7d97e745b3e6a3834f41ac7bfefa4883c7a
2014-09-26remove pointless commentsNoel Grandin
Change-Id: I8edfe830b8f6ca7f1809332870e06d1d286b90e8
2014-09-26remove unnecessary casts'sNoel Grandin
left over from our conversion of the SvStream output operators to more specific methods Change-Id: I63f18be8e940098c2acbbc73ee49ede3a949fcb2
2014-09-26remove unnecessary static_cast'sNoel Grandin
left over from our conversion of the SvStream output operators to more specific methods e Please enter the commit message for your changes. Lines starting Change-Id: Ibfe7635451ef7b8813d7a59c78c5223092a17ad5
2014-09-25coverity#1240250 Buffer not null terminatedCaolán McNamara
doesn't matter in practice Change-Id: I410022a395d25827217b9c542d79718f6f5b333d
2014-09-23fdo#82577: Handle WindowNoel Grandin
Put the VCL Window class in the vcl namespace. Avoids clash with the X11 Window typedef. Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2014-09-22fdo#84086 Fix assorted use-after-free bugsMatthew J. Francis
Change-Id: Iec004fffdb0afbe27bd69f379db90f6d904a8a65 Reviewed-on: https://gerrit.libreoffice.org/11553 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-09-22fdo#62104 Optimize thumbnail size by using PNG8 and other tricksTomaž Vajngerl
Change-Id: I54ece4a1977fe93c0e7bbb11774bd8657912c6bb
2014-09-21set mpFirstBand back to 0 after deleting itCaolán McNamara
bff + valgrind ==30470== Invalid read of size 8 ==30470== at 0xA02103F: RegionBand::isSingleRectangle() const (regionband.cxx:294) ==30470== by 0xA01F562: WriteRegion(SvStream&, Region const&) (region.cxx:1640) ==30470== by 0x9F01FD4: MetaClipRegionAction::Write(SvStream&, ImplMetaWriteData*) (metaact.cxx:2487) ... ==30470== Address 0x1d175980 is 0 bytes inside a block of size 56 free'd ==30470== at 0x4A07991: operator delete(void*) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==30470== by 0xA020BB1: RegionBand::implReset() (regionband.cxx:87) ==30470== by 0xA020EF2: RegionBand::load(SvStream&) (regionband.cxx:249) Change-Id: I2468d43c7e73b3390f355358990f8af30b5f026e
2014-09-18fdo#82577: Handle FontNoel Grandin
Put the VCL Font class in the vcl namespace. Avoids clash with the X11 Font typedef. Change-Id: I1a84f7cad8b31697b9860a3418f7dff794ff6537
2014-09-12Revert "vcl: use DeviceCoordinate for GetCaretPositions in sallayout"Norbert Thiebaud
This reverts commit 1b42acdaeae134f94580d6e1eba89da16741d596.
2014-09-12fdo#66701 - don't double destroy the HASH when PDF signing.Michael Meeks
Accidentally introduced in d73c039fa it seems. Change-Id: I846314ebca3a24520492887d4d9027f812cfb32f
2014-09-12vcl: use DeviceCoordinate for GetCaretPositions in sallayoutNorbert Thiebaud
Change-Id: I5a959e1c3806da713e106c1b0fc8690a6578987b
2014-09-12minor whitespace changeChris Sherlock
Change-Id: I556a68a2da770080e475a4e6619722fd721101ca
2014-09-10clip PolyPolygon::Insert on .svm loadCaolán McNamara
valgrind + bff Change-Id: Ib3ed8a6e518c0686f8cbeaf021b9ca3a07005032
2014-09-10vcl: BitmapEx now states which icon theme is being used for missing imageChris Sherlock
Change-Id: I83b9c86685f72569c0df88231458183b1ae511c8
2014-09-03extra witdh for GetTextBreak is of DeviceCoordinateNorbert Thiebaud
Change-Id: Ic25eae1e9b8ae14022ee8d0373be0978ebc21267
2014-09-03SalLayout GetTextWidth return DeviceCoordinateNorbert Thiebaud
Change-Id: I5b995e54992213e95845e60169238270863e9a7e
2014-08-26bnc#719994: Fix the duotone filter to actually produce duotoneTor Lillqvist
Not sure what it tried to do earlier, but it was obviously wrong. Change-Id: I0b377c4baa88205a9a7ad7c134ec5bc2223e6205
2014-08-22font lookup - cleanup GetEnglishSearchName function signature.Michael Meeks
Change-Id: I6e3ca358d88e0285fe6e07b0617f3078a5edb857
2014-08-21vcl: convert push flags to type-safe enum-like classNoel Grandin
Change-Id: Ib49a0dd5ecee0225f51bea2ff1c0ab5326595a47
2014-08-20vcl: use enum for complex text layout constantsNoel Grandin
Since these constants are bitfield flags, we define some methods to make working with them reasonably type safe. Move the definitions to outdevstate.hxx, since we need the values there, and that appears to be the "root most" header file. Also dump TEXT_LAYOUT_BIDI_LTR constant, since it means the same thing as TEXT_LAYOUT_DEFAULT (ie. 0), and leaving it in causes people to write weird code thinking that it's a real flag. Change-Id: Iddab86cd6c78181ceb8caa48e77e1f5a8e526343 Reviewed-on: https://gerrit.libreoffice.org/10676 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-08-17coverity#735993 Explicit null dereferencedCaolán McNamara
Change-Id: Ib8b1af5a783a2bae285c24e5153cce4713a2e2dd