summaryrefslogtreecommitdiff
path: root/vcl/generic
AgeCommit message (Collapse)Author
2013-10-31Convert indexOf->startsWith and lastIndexOf->endsWithNoel Grandin
This is both an optimisation and a cleanup. This converts code like aStr.indexOf("XX") == 0 to aStr.startsWith("XX") and converts code like aStr.lastIndexOf("XXX") == aStr.getLength() - 3 to aStr.endsWith("XXX") Note that in general aStr.lastIndexOf("X") == aStr.getLength() - 1 converts to aStr.isEmpty() || aStr.endsWith("X") so I used the surrounding context to determine if aStr could be empty when modifying the code. Change-Id: I22cb8ca7c2a4d0288b001f72adb27fd63af87669
2013-10-30fdo#70968: Incorrect rendering of Devanagari short 'i' vowelKhaled Hosny
It seems that some Indic fonts assign 'mark' glyph class to combining spacing marks (spacing not non spacing) so my reliance on the glyph class to set the IS_DIACRITIC flags broke those fonts. This is a bandaid to get around the issue, plus some long rant! (at this rate, I'll be writing "The VCL haters handbook" pretty soon). Change-Id: I3ff892acf746d50182573f94e7e8c3c6f9464ae0
2013-10-30SimplifyKhaled Hosny
Change-Id: I30ab912b96fffa181b5cf062ecdf80faec615ec3
2013-10-29TypoTor Lillqvist
Change-Id: I564659c8b05f08d497b778144a04464ba8f9ddd6
2013-10-29Add a SAL_WARN_IF to get more verbose information when CheckYieldMutex() failsTor Lillqvist
Change-Id: Ia9b9e43a25c1d86e3f8c6d9a29d54dd94625bb0d
2013-10-28fixincludeguards.sh: vclThomas Arnhold
Change-Id: I3858c2152267474afab8e5a72b9f5da0ac623012
2013-10-23convert code to use OUString::endsWithNoel Grandin
Convert places that call aStr[aStr.getLength()-1] == 'x' to use the shorter form aStr.endsWith("x") Change-Id: I1b3a19c0e89b8989cdbeed440f95fc76f9a4b6b6
2013-10-22Bin comments that claim to say why some header is includedTor Lillqvist
They are practically always useless, often misleading or obsolete. Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-10-21Exempler->ExemplarCaolán McNamara
Change-Id: Id7e67d7e7bd4be6600a296a846512e9076c9df23
2013-10-21Remove GetKernPairs() with no implementationKhaled Hosny
I left only the Windows one because it being called (as GetKernPairs(0, NULL), but may be it does something, who knows). Change-Id: Iec05d61c8f0cd311a1158bb1cb07e4ee977f32fe Reviewed-on: https://gerrit.libreoffice.org/6260 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2013-10-21Removed unused kerning stuffKhaled Hosny
Kerning is just another font feature and is already handled by the layout engine, there is nothing special about it. Non of this seems to be used anywhere, anyway. Change-Id: Ia40c66ec186d11ab46d5d5256b09307a319318c0 Reviewed-on: https://gerrit.libreoffice.org/6259 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2013-10-21Drop support for non-Unicode fontsKhaled Hosny
They fell out of use before I had my first computer. This has no relation to the input text encoding being used. Change-Id: Ie1fde3c3578c80d77ebd63531e74c13931d46bbc Reviewed-on: https://gerrit.libreoffice.org/6258 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2013-10-20Bin pointless #ifdef'd codeKhaled Hosny
This file is never compiled under Windows or Mac. Change-Id: I25a1b961959a8935a95d872f667681379f85893a Reviewed-on: https://gerrit.libreoffice.org/6256 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2013-10-07CID#708635 uninitialized membersCaolán McNamara
Change-Id: I875f11347c8d73297ef19c7da858b7246ebd44ca
2013-10-07CID#708895 unused variableCaolán McNamara
Change-Id: I09ff8a9e7c15c45d6d95c6abd750a4f1386a87ac
2013-10-07CID#736943 clamp no of ttc entries to physical maxCaolán McNamara
Change-Id: Ic63defe9c14c6ee2b86bd5b7730a570238ca3981
2013-10-02Spell "indices" correctlyTor Lillqvist
Change-Id: I63b1de195bf2f3f8bfd185181f48b1520cdd849f
2013-09-26typo fixes in commentsAndras Timar
Change-Id: Iaadec33715f8e0e0c6595c5e684606905274fdab
2013-09-25Related: fdo#38838 remove UniString::EqualsIgnoreCaseAsciiCaolán McNamara
Change-Id: Ib5c3a2daa4a48bc286b14fa2cebb3306ea0012bc
2013-09-20Font and ImplLayoutArgs with LanguageTagEike Rathke
Avoid the gazillion temporary conversions / Impl searches. Change-Id: I5232589f1e31d1cbb6becc198b12daabf1038f31
2013-09-11typo fix: wether -> whetherAndras Timar
Change-Id: Iad4182d7150f851df06a7208a811d482351f736a
2013-09-09CID#738553 uninitialized scalarCaolán McNamara
Change-Id: Iaa5cbce576e8a90f7dd89737a9458408dd3d84fa
2013-09-06Check for FT_Face_GetCharVariantIndex at build timeKhaled Hosny
No more dlsym() hacks. The downside is that LibreOffice built on systems with old FreeType will not be able to use FT_Face_GetCharVariantIndex() on newer systems, but most Linux users use their distribution builds anyway. This only affects the use of Unicode Variation Selectors which is an exotic feature that wasn't even supported on Linux before 4.1. Change-Id: I674822ef5bc8d7940a821a01cc85ae7a6d39a80e Reviewed-on: https://gerrit.libreoffice.org/5844 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-06Simplify FreeType version checkKhaled Hosny
After 00a81233d9c2ae6b3996b744982715137fd6a626, we can rely on the version of the runtime library. Change-Id: I9af4a524c893d125d185da50334622007f2e44ce Reviewed-on: https://gerrit.libreoffice.org/5843 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-04Require FreeType >= 2.2.0Khaled Hosny
That should be older than what RHEL-5 have, so closer to our real baseline. Cleanup checks for older FreeType as a side effect. Change-Id: I10dc6a3064b6be88cd7bdc72c501d50df4a2613b Reviewed-on: https://gerrit.libreoffice.org/5804 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-04FT_Size API is available since FreeType 2.0.5Khaled Hosny
We require at least 2.0.9 right now anyway, so no drop the dlsym hacks. This is essentially a revert of a36dab4a598c4ac168c7ef1df4d061613e40e416 from 2003. Change-Id: Id9bca2962f25d92f1707bc3d1efc054ffd22c714 Reviewed-on: https://gerrit.libreoffice.org/5803 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-08-30Remove hacks for ancient FreeTypeKhaled Hosny
We don't support FreeType <= 2.0.9, since configure already checks for >= 2.1.5 (which is pretty ancient and was put there arbitrarily as the first FreeType version to ship a .pc file, but that is a different story). Change-Id: Iae7c950ff7b48eae22fbe98bdda726318e9dea9a
2013-08-26Simplify iterator management (part2)Julien Nabet
Change-Id: Id4efe9b7c3831c09043644ad2445cd8f00aecd66 Reviewed-on: https://gerrit.libreoffice.org/5628 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2013-08-26Simplify a bit iterator managementJulien Nabet
Change-Id: Id15fb18df7b1a8da1ff260f8b2c72ed6cd5d352a Reviewed-on: https://gerrit.libreoffice.org/5605 Tested-by: Jan Holesovsky <kendy@suse.cz> Reviewed-by: Jan Holesovsky <kendy@suse.cz>
2013-08-22Don't re-create Unicode and font functions for every text runKhaled Hosny
Change-Id: I35ba21d753adfc619656d4473b214485dc00faba
2013-08-22fdo#66715: Avoid compatibility decomposition with HarfBuzzKhaled Hosny
Change-Id: Ibbf5720baf7fb507e66515104115d58597258b1d
2013-08-21finish deprecation of O(U)String::valueOf()Luboš Luňák
Compiler plugin to replace with matching number(), boolean() or OUString ctor, ran it, few manual tweaks, mark as really deprecated. Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
2013-08-18Use subfolder names from <config_folders.h>Tor Lillqvist
Change all instances of hardcoded "program", "share" etc subfolder names to use those from <config_folders.h> instead. In normal builds, the end result will not change. Change-Id: I91c95cd8e482818be67307e889ae6df887763f53
2013-08-12convert vcl/inc/outfont.hxx from String to OUStringNoel Grandin
Change-Id: I6b9b5f0cd51412ad14f1a07f2ad3a03bd17bb5d3
2013-08-12convert vcl/inc/fontcache.hxx from String to OUStringNoel Grandin
Change-Id: If3ad694b80209f401bc73461d219006058bd11e1
2013-08-12convert vcl/ppdparser.hxx from String to OUStringNoel Grandin
Change-Id: I8a95a98e5cc92e5bedb4813411afc86cc438fdad
2013-07-30fdo#66715: fontconfig: try harder to ignore duplicate fontsMichael Stahl
The thin space not being displayed correctly is caused by using the wrong font, namely /usr/share/fonts/liberation/LiberationSerif-Regular.ttf, which (on Fedora 18) is version 1 and does not contain u2006 etc. glyphs, whereas the LiberationSerif-Regular.ttf bundled with LO is version 2 and does contain these. There is already isPreviouslyDuplicateOrObsoleted() function to ignore older fonts but it does not work for this case because: 1) Only the previous element was looked at, but there may be several fonts with different weight/slant that need to be checked. 2) The LiberationSerif-Regular.ttf differ in the "lang" entry. Change-Id: I2f9e8d50a1f8155b65f8f07c9259dd988c32992a
2013-07-30vcl: fix obviously wrong mapping of WIDTH_ULTRA_EXPANDEDMichael Stahl
Change-Id: I2f23f51e7f04df6fcbc1e2d6661949b830cc248e
2013-07-12Fix headless mode glyph cache memory handlingStephan Bergmann
...the original code was riddled with errors. It leaked memory, which if it didn't it would have deleted multiple times. Change-Id: Ic70b425fac02ef894e35b3dc15039d217f8870f5
2013-07-11Related: fdo#66524 don't invalidate font cache every timeCaolán McNamara
The afm dirs are misdetected as having had something in it in the past and having nothing in it now. AFAICS it seems that this particular code has always been like this, so keeping this fix separate for master only. Change-Id: I8960d0b0d22ee24d5691eecdce262011dc141ea6
2013-07-11Resolves: fdo#66524 string conversion gone wrongCaolán McNamara
Change-Id: Ie885514cdfaecc14ac57bb53a2da7c51274d54b0
2013-07-08-Werror,-Wdeprecated-register (Clang trunk towards 3.4)Stephan Bergmann
...in files generated by gperf; an alternative could be to use -isystem instead of -I in gb_Library_use_custom_headers. Change-Id: I316684ab5342977655a5642903b13e127adaf95c
2013-07-04MinorKhaled Hosny
Change-Id: I6a9f34e6da1344e718ef5c8dc136fac7244b0f47
2013-06-30Fix memory leak in ServerFont::GetGlyphOutline.Mark Wielaard
Always call FT_Done_Glyph before returning. Change-Id: I861bcc66b065d9cfb909b3ea561af97caccc4593 Reviewed-on: https://gerrit.libreoffice.org/4635 Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> Tested-by: Khaled Hosny <khaledhosny@eglug.org>
2013-06-27Always embed 14 standard Postscript fonts in PDFKhaled Hosny
Ealier version of PDF standard allowed for not embedding the so called standard PostScript fonts in the PDF files and all PDF readers had to include them or a "suitable substitute". This behaviour had many issues and is deprecated for 10 years now. The current version of PDF spec says: Beginning with PDF 1.5, the special treatment given to the standard 14 fonts is deprecated. Conforming writers should represent all fonts using a complete font descriptor. For backwards capability, conforming readers shall still provide the special treatment identified for the standard 14 fonts. This commits removes support for not embedding these fonts, and the, now redundant, option to embed them. This has the side effect of elimanating the cause of fdo#66108 and fdo#41547. Change-Id: I4f1fc4137a2de7baeef9e504f2e4f84fbec0a491 Reviewed-on: https://gerrit.libreoffice.org/4495 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-06-24Resolves: fdo#66042 get the bounds of the current graphemeCaolán McNamara
Change-Id: I5b1808d74f0a1dd0d8b6ea22136e574c0a6e8e2a
2013-06-24fdo#43460 shell,vcl,xmlreader: use isEmpty()Jelle van der Waa
Change-Id: Ie3d16da6c246b79c4c304b21476f84b2788f0d6e Reviewed-on: https://gerrit.libreoffice.org/4444 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-06-20-Werror,-Wdeprecated-registerStephan Bergmann
Change-Id: I8edac5a93f9471c6f245bd484e845985c11027dd
2013-06-20Fix calculation of internal leadingKhaled Hosny
Stupid me, I totally messed this up! God only knows how many non-bugs people had to fix because of this typo. Has the side effect of fixing fdo#64972 (among many others of course, but this is the only one still open). Change-Id: I9d8fdb6d37d4af9b0ac973902e469e0bd3a2408a
2013-06-18sal_Bool to boolTakeshi Abe
Change-Id: Id1c64ab4be262713204cfeeb6333ec7d33fffcfb