Commit Graph

76 Commits

Author SHA1 Message Date
Stephan Bergmann
c3dcdeb1d2 loplugin:nullptr (automatic rewrite)
Change-Id: Idec97093ca48c14b825c7b87ec050cc99aadc526
2015-11-10 10:31:27 +01:00
Noel Grandin
59b072e22b yyyyy
Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
2015-11-04 14:10:44 +02:00
Stephan Bergmann
41e2f34548 clang-analyzer-deadcode.DeadStores
The code had been like this ever since 16cba77220
"#112673# initial checkin of HWP filter."  Assuming that the second line should
rather read

  angle = 1800 - angle * 10;

instead of

  angle = 1800 - prop->angle * 10;

does not look too plausible:  It would keep mapping

   -1  ->  181
    0  ->  180
    1  ->  179
       :
  179  ->    1

but then would discontinuously map

  180  ->  180
  181  ->  179
       :

instead of continuously mapping

  180  ->    0
  181  ->   -1
       :

Change-Id: I8cf97eeb53409b18bda6777b09a20331f3c8132a
2015-10-07 11:32:43 +02:00
Caolán McNamara
22b80ac8e2 boost->std
Change-Id: I3fd9e1599c5ad812879a58cf1dabbcd393105e1c
Reviewed-on: https://gerrit.libreoffice.org/18564
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-14 12:54:25 +00:00
Stephan Bergmann
42e379a542 clang-tidy clang-analyzer-deadcode.DeadStores
...ever since its inception in 16cba77220
"#112673# initial checkin of HWP filter" (but curr is needed as a local scratch
pad in the STARTT macro)

Change-Id: I7233bf99b7d6f9ac0d3d3384ba4508f84ba8fa38
2015-09-03 11:43:57 +02:00
Caolán McNamara
5684fbce64 add hwp to fftester
Change-Id: Ibf819307905295580cb6a813f6d003a7dabc86b5
2015-08-21 16:17:26 +01:00
Jihui Choi
188208d93a tdf#91067: Translate Korean comments
Change-Id: Idbee9cb5a1745bb2cc3c4cb1238773da7ff2a0a3
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2015-07-16 05:35:30 -05:00
Stephan Bergmann
3c7a66a031 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I8a8ba86dd78e30146f7b9dd7071f5641d496a67a
2015-06-08 16:25:38 +02:00
Stephan Bergmann
e58fccdadb More loplugin:simplifybool
Change-Id: I64ec8a0525b935d12455f7ed236ffd367f47c070
2015-04-27 15:30:57 +02:00
Stephan Bergmann
33815ec449 Clean up C-style casts from pointers to void
Change-Id: Ifbdbd2bb8a21afa76271728c46f88c11a887fc5a
2015-03-28 19:09:21 +01:00
Noel Grandin
c3dc467232 loplugin:constantfunction: hwpfilter
Change-Id: I2504291e2167cbc4be91e01de654ca63f89dbd2a
2015-03-24 10:31:18 +02:00
Caolán McNamara
ab86a53623 V805: Decreased performance
Change-Id: I822c5ebc321ebda87c238a1781a31793c1623e34
2015-03-02 14:21:52 +00:00
Stephan Bergmann
552efce640 Some more loplugin:cstylecast: hwpfilter
Change-Id: I0ba3fe95ab6ef317166b286531a718287308f62f
2015-01-20 09:06:48 +01:00
Michael Weghorn
e31657a1ea fdo#39440 reduce scope of local variables
This addresses some cppcheck warnings.

Change-Id: I9812658e8a96dd35d686c7ae7a8b829267c5c8bc
Reviewed-on: https://gerrit.libreoffice.org/13499
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-17 07:32:56 +00:00
Stephan Bergmann
73441b0b65 hwpfilter: Use appropriate OUString functions on string constants
Change-Id: I4e6b8077fd564be9508e5a08f2eb66032f5f3f40
2014-12-15 10:13:08 +01:00
Michael Stahl
6a0fe37dec sal: clean up public headers with include-what-you-use
Sadly cannot forward declare "struct {...} TimeValue;".

rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h
was painful enough for now...

Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
2014-11-17 11:06:53 +01:00
Noel Grandin
e27ac011c3 loplugin: cstylecast
Change-Id: I9fca98995131358b3b112b11e0b28feb1a3267d1
2014-10-01 13:08:43 +02:00
Stephan Bergmann
9703cc63ce Remove o3tl/heap_ptr.hxx, use std::unique_ptr instead
Change-Id: Iac70c9be13892a36bfb5975f62e5345b88d4f144
2014-09-24 14:54:51 +02:00
Julien Nabet
8088aeabe4 cppcheck: Logical conjunction always evaluates to false
I don't know how to check it's ok, I just took example above
It seems there was a wrong mix between header and footer test

Change-Id: Ia5bb838e92306f3bb160069a7c62707e365e8ab2
2014-08-31 11:18:47 +02:00
Stephan Bergmann
2617def8d1 Fix (harmless) stack-use-after-return
...as reported by -fsanitize=address CppunitTest_hwpfilter_test_hwpfilter, where
stack-local HStream stream from HwpReader::filter is still referenced from
HStreamIODev in

  HStreamIODev::close
  HStreamIODev::~HStreamIODev
  HWPFile::~HWPFile
  HwpReader::~HwpReader

which is only harmless because HStream::closeInput is a nop.

Change-Id: Idbc5539ab5f463ec6d5d72f428ce60327ebdb063
2014-07-03 13:11:58 +02:00
Noel Grandin
e2080e70fe new compilerplugin returnbyref
Find places where we are returning a pointer to something, where we can
be returning a reference.
e.g.
   class A {
     struct X x;
     public X* getX() { return &x; }
   }
which can be:
     public X& getX() { return x; }

Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
2014-06-24 11:34:21 +02:00
Caolán McNamara
a4d416a7c8 coverity#705182 Missing break in switch, assuming its intentional
Change-Id: Ib8d2bc5a5772f6611f9d977376f6fef9505c6a59
2014-06-05 13:35:52 +01:00
Caolán McNamara
402c55e510 coverity#705181 Missing break in switch, assuming its intentional
Change-Id: I2b83f3e5a4fb65819244b88fdad7e48fe918b4bd
2014-06-05 13:35:52 +01:00
Noel Grandin
fc06e00fd4 hwpfilter: sal_Bool->bool
Change-Id: Ib35ed616fb6bb8829a97112b2563c1d1ef4c0747
2014-04-23 11:10:09 +02:00
Stephan Bergmann
29a96480b0 Clean up function declarations and some unused functions
Change-Id: I7eba9260b33e0b92ed997bf624d866644a091f29
2014-04-14 13:02:26 +02:00
Stephan Bergmann
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
Alexander Wilms
294229eb42 Remove visual noise from hwpfilter
Change-Id: I57ea366a5ba585374773f53ca6cee99085fd846a
Reviewed-on: https://gerrit.libreoffice.org/8267
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 09:01:34 -06:00
Stephan Bergmann
a54fd6ae34 bool improvements
Change-Id: I53fabee80a6c16f0c9cc2da2c94099a21e69aae9
2014-01-28 20:26:27 +01:00
Caolán McNamara
2f0a036745 CID#982610 inefficient iterator usage confusing coverity
Change-Id: I79142f5f1723fa2db0e729cb0dacb201e41077bc
2013-12-19 11:31:14 +00:00
Caolán McNamara
47bda1cfc9 fix indent
Change-Id: I68aae5b6059c0e7281e45d39eb94ce247c6dae47
2013-12-19 11:31:14 +00:00
Caolán McNamara
976193c1b6 CID#982609 inefficient iterator usage confusing coverity
Change-Id: I9f170cc8c36fe89e596ee703231ba8abff5564c5
2013-12-19 11:31:13 +00:00
Caolán McNamara
5594f633a1 fix indent
Change-Id: I6e531cdd2dd0657286cc369031072c28cf9c8e37
2013-12-19 11:31:13 +00:00
Stephan Bergmann
24cad6a649 Move MediaDescriptor from comphelper to unotools
...so it will be able to use SvtSecurityOptions internally.

Change-Id: Id7433247e8fc53651935578510bedbcca5aa2ac9
2013-11-14 11:13:24 +01:00
Luboš Luňák
64b993e046 finish deprecation of O(U)String::valueOf()
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-21 15:10:35 +02:00
nccuong
a6b9173005 fdo#60148 Clean up warnings from the Clang compiler plugin
Change-Id: I08d755677c46c476710ecbd067ed9f7e2f54a671
loplugin: clean warnings: unused variables, incorrect indentation and log area.
Reviewed-on: https://gerrit.libreoffice.org/2544
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2013-03-06 12:59:26 +00:00
Thomas Arnhold
4f4e4e40f5 loplugin: improve indentation
Change-Id: Idb847766d93dc222d6c55889616da21eeac212ee
2013-02-25 17:59:40 +01:00
Noel Grandin
c849c4b987 sal_Bool->bool in hwpfilter
Change-Id: Ief6d6678a04084a90d07d87780689b92af2e3ba4
2012-10-04 21:29:33 +02:00
Noel Grandin
dea967349c sal_Bool -> bool in hwpfilter
Change-Id: Ia1b6830ef9ab06a1914abb7f6d5857ce9d845061
2012-10-04 21:29:32 +02:00
Andras Timar
c5ce5b73b9 Fix windows build where min and max are macros
Change-Id: I265e0fddc12a40cff0b6a6172bfca96eda0842ec
2012-08-08 10:27:00 +02:00
Ivan Timofeev
10f08195b8 -Werror=format
Change-Id: If468ca444865f81a7adeabb72ecb6d8647f6dde0
2012-07-24 21:26:48 +04:00
Michael Stahl
5a243f1409 hwpfilter: improve text import and error handling
Change-Id: Ib74b96200c9d57f55fc0d32b638601c64e7eb6fe
2012-07-24 11:37:41 +02:00
Michael Meeks
ae9dae720b re-base on ALv2 code. Includes:
Use ksc5601.h header from XFree86 Project Inc. Patch contributed by
    Oliver-Rainer Wittmann with minor changes from Pedro Giffuni
    http://svn.apache.org/viewvc?view=revision&revision=1179296
2012-06-22 16:31:32 +01:00
Szabolcs Dezsi
e4fb171d3a Replaced a few equal calls with == 2012-04-08 19:24:00 +02:00
Luboš Luňák
80e4b4e5c6 mark static data that is const as const 2012-03-10 16:39:22 +01:00
Szabolcs Dezsi
db74590950 Kill LinkedList in hwpfilter 2012-03-05 10:44:54 +02:00
Thomas Arnhold
a2a2e45c3e WaE: duplicateBranch 2012-02-21 20:56:59 +01:00
Elton Chung
806bec7107 Fix typos in comments 2012-02-13 15:27:24 +00:00
Norbert Thiebaud
f7738e755b remove include of pch header from hwpfilter 2011-11-27 13:11:50 -06:00
Tor Lillqvist
12330bfe5b Fix Windows build 2011-06-27 14:06:18 +03:00
Caolán McNamara
e8de073d63 use size_t here 2011-06-21 12:24:31 +01:00