summaryrefslogtreecommitdiff
path: root/vcl/source/fontsubset/cff.cxx
AgeCommit message (Collapse)Author
2018-11-03tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski
Change-Id: I856345576ff5c10a41509a97ad4539272bd55568 Reviewed-on: https://gerrit.libreoffice.org/62803 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-19clang-tidy readability-misleading-indentationNoel Grandin
Change-Id: I4673fc7c694924b41d048a1918ddb8b0e0af1f79 Reviewed-on: https://gerrit.libreoffice.org/61935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann
...where "inline" (in its meaning of "this function can be defined in multiple translation units") thus doesn't make much sense. (As discussed in compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions in include files for now.) All the rewriting has been done automatically by the plugin, except for one instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus some subsequent solenv/clang-format/reformat-formatted-files. Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224 Reviewed-on: https://gerrit.libreoffice.org/61573 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-17New loplugin:externalStephan Bergmann
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-14loplugin:constfields in vclNoel Grandin
Change-Id: I1072642be4fdfa720e61f2d7bad3c2701eb81610 Reviewed-on: https://gerrit.libreoffice.org/60430 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-31Add missing sal/log.hxx headersGabor Kelemen
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directory vcl Change-Id: I205fe0f4e80a66cd9c3b19f7e9716411da1d1cf5 Reviewed-on: https://gerrit.libreoffice.org/58221 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-27loplugin:returnconstant in vclNoel Grandin
Change-Id: I597ef6d75d1c21cdc15a91bf7f549bc14c851506 Reviewed-on: https://gerrit.libreoffice.org/58086 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-27loplugin:expressionalwayszero improvementsNoel Grandin
Change-Id: I00bdbc58d2295a0be30b47c85eae6b9abfec17b2 Reviewed-on: https://gerrit.libreoffice.org/51868 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-12More loplugin:cstylecast: vclStephan Bergmann
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I363c01a1ae9e863fca4fb4589829492d7280d711
2018-01-09route cff typedefs to our sal onesCaolán McNamara
Change-Id: Idbe907195f6e800e42c59ac8dbe4385d60afee80 Reviewed-on: https://gerrit.libreoffice.org/47610 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-09tdf#114704 use of float as intermediate causes out by one on large offsetsCaolán McNamara
table offset integer value of 21281769 is correctly read, but on cast to float it is represented as 21281768 and we're off by one when cast back to integer later Change-Id: I5694e14d72c04493ba15cc77485a734498a45468 Reviewed-on: https://gerrit.libreoffice.org/47607 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-23loplugin:includeform: vclStephan Bergmann
Change-Id: Id7dea3917740aaf4db8dada5e2bea6e117d714ea
2017-10-05loplugin:finalclasses in vclNoel Grandin
Change-Id: I7de9cd6c5569217aa8d379c6d112cd1874bca8e2 Reviewed-on: https://gerrit.libreoffice.org/43151 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-02loplugin:casttovoid: vclStephan Bergmann
Change-Id: Icdc9d009849f2a93f6e1dbba07b1042dbb1ff561
2017-06-30loplugin:unusedfields in toolkit..xmloffNoel Grandin
Change-Id: I4964ff97e0a1735dc08c6ad204cae0b08e9ffc2c Reviewed-on: https://gerrit.libreoffice.org/39406 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-17loplugin:unusedfields in vcl part2Noel Grandin
Change-Id: Icd02f63e9738c0bb91348e2084649f9edc281e67 Reviewed-on: https://gerrit.libreoffice.org/38833 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-14use more SAL_N_ELEMENTS part 1Noel Grandin
- teach comphelper::containerToSequence to handle sized arrays - also use range based for-loop where appropriate. Change-Id: I73ba9b6295e7b29c872ee53de7a9340969e07f99 Reviewed-on: https://gerrit.libreoffice.org/38769 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-02-20IGNORE_HINTS have never been definedKhaled Hosny
Change-Id: I35d08f6ff1ff3e78a5078062cef89304fa782489
2017-02-09convert FontType to scoped enumNoel Grandin
Change-Id: Ieb8f90be8effde5f25bc872784c3ea2177b14bf9 Reviewed-on: https://gerrit.libreoffice.org/34056 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-27loplugin: unnecessary destructor vbahelper..vclNoel Grandin
Change-Id: I6b7800d4a456391251168f7923a1ec7a5ca9efc9 Reviewed-on: https://gerrit.libreoffice.org/33577 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-06New loplugin:charrightshiftStephan Bergmann
Change-Id: Ib645fb11004bc0fe05c9c416ae72b0ae56c23a15
2016-09-15loplugin:countusersofdefaultparams in vclNoel Grandin
Change-Id: I046e6f16c5b171a06e2be2da2f72340634f3e979 Reviewed-on: https://gerrit.libreoffice.org/28891 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-06-27loplugin:singlevalfields in vcl(part2)Noel Grandin
Change-Id: I4782c6f6d3d090ba0f9e29af8afdd7d88aa2d382 Reviewed-on: https://gerrit.libreoffice.org/26598 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-10tdf#96099 Remove various smart pointer typedefs in vclMark Page
Change-Id: I4ac1bb25d3d63f150b42d9e1708efc344bbdb6a7 Reviewed-on: https://gerrit.libreoffice.org/26113 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-14cppcheck: uninitialised members in vclJochen Nitschke
and remove clear() on std::vector types in ctors Change-Id: I8e239676d46e30049d4d5886a5b8de99cadd3f45 Reviewed-on: https://gerrit.libreoffice.org/24983 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-10Replace fallthrough comments with new SAL_FALLTHROUGH macroStephan Bergmann
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in preparation of enabling -Wimplicit-fallthrough. (This is only relevant for C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.) Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but that would require adding back in dependencies on boost_headers to many libraries where we carefully removed any remaining Boost dependencies only recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its future evolution will not have any impact on the stable URE interface.) C++17 will have a proper [[fallthroug]], eventually removing the need for a macro altogether. Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-02-26loplugin:unuseddefaultparam in vcl/Noel Grandin
Change-Id: Ic09d160ed6e3cdcd95bc04844ee8f20cfcb286ec Reviewed-on: https://gerrit.libreoffice.org/22698 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-18loplugin: unused return values in vcl/Noel Grandin
Change-Id: I879bd3bec4dd2cf002681f1e50b6c33cce0934a9
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I05e89f9896170d4df3d1377549ea074f06b884a0
2015-09-04Reduce nVal scopeStephan Bergmann
Change-Id: Id5756033ccfbe392ae8264afbd3e2e0afd487f6b
2015-09-04Uniformly use if --- else if brachnes hereStephan Bergmann
Change-Id: I80d9d0d4c4d56aa8d52dc2e108a9b24025fb0f76
2015-09-04clang-tidy clang-analyzer-deadcode.DeadStoresStephan Bergmann
Change-Id: I1588f55b4be2d32dcafae27ac45eb5def1407fa6
2015-08-11loplugin: defaultparamsNoel Grandin
Change-Id: I79a889c68e91712d2abdacc559c78813f730e623
2015-07-04Fix typosAndrea Gelmini
Change-Id: Id9296115f30858e7fd470a199e59343a96d7deec Reviewed-on: https://gerrit.libreoffice.org/16712 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-05-11loplugin:cstylecast: nop between pointer types of exactly same spellingStephan Bergmann
Change-Id: I0f844c7265b52d668bc6a2368321950a1a00cce5
2015-04-15remove unnecessary use of void in function declarationsNoel Grandin
ie. void f(void); becomes void f(); I used the following command to make the changes: git grep -lP '\(\s*void\s*\)' -- *.cxx \ | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;' and ran it for both .cxx and .hxx files. Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
2015-01-20Some more loplugin:cstylecast: vclStephan Bergmann
Change-Id: I74d35630b9fcdaa97af0b1f1e6d1e5c72488964d
2014-11-12coverity#735344 Unchecked return value from libraryCaolán McNamara
Change-Id: I6dbb5ce74225e092d4098174fd4b53aa8c4201fa
2014-10-06Remove pointless commented-out 'virtual' keywordsTor Lillqvist
Nobody knows any more what such a metacomment was supposed to mean, if it had any deeper meaning at all. Change-Id: Iefb4fedc7b833c09ee0e39b3eb28202229323ef2
2014-08-05fdo#81516: vcl: limit number of CFFs read from fontMichael Stahl
Change-Id: I9928b9805169a2dbb41be669dc37617b30bc672b
2014-08-05fdo#81516 Support fonts like Source Han Sans with > 16 FDArray elementsAudrey Tang
Change-Id: I3f82574f434060d62dc3faeb730341c5b169ce9f
2014-06-27tweak assert so comment appears in abort messageCaolán McNamara
Change-Id: Ibf78e5cd1620f0b61cae030e3870be4a6f87e71d
2014-05-16coverity#1202771 Operands don't affect resultCaolán McNamara
Change-Id: I6a0228594d31cda252f299cad55469ad02c6b353
2014-05-09'!= false' is redundant, and confusing - kill it.Jan Holesovsky
Change-Id: I1a52b9ce7b590e8cf274a2daaa1c55cfc1efe48b
2014-04-22coverity#1202749 Bad bit shift operationCaolán McNamara
these longs are really intended as x86 longs, i.e. 32bit Change-Id: I19b68556b0ed57cbcb59338f1d0b4174878fd993
2014-04-17coverity#708590 Uninitialized pointer fieldCaolán McNamara
Change-Id: Ibd425a4778e2d9b1feb5f54565d80673f03e8e56
2014-04-08Clean up function declarations and some unused functionsStephan Bergmann
Change-Id: I382289c7188dfdc9839ff9e6362b6e039ffc5f9e
2014-04-03Remove unnecessary SubsetterContext base classStephan Bergmann
Change-Id: Ia000655f3fe49a4c9c1015b37f44c0ba44d7666e
2014-04-02Kill superfluous vertical whitespaceTor Lillqvist
Change-Id: I81ce8fd7022bf283db668705efdfb0666f87bde9