Commit Graph

298 Commits

Author SHA1 Message Date
fe480d8136 remove unused typedefs
found with some minor modifications to find/find-unused-defines.sh

Change-Id: I18cc479adedc7a0dada68a4aeef08300e62631dd
Reviewed-on: https://gerrit.libreoffice.org/14194
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-28 06:19:49 +00:00
598d8194b0 Visible function type RTTI for Clang -fsanitize=function
...by adding some further SAL_DLLPUBLIC_RTTI type annotations (cf.
b4f6b26b5a1a78fecfa95ec2eb7ac8b80495d8aa "SAL_DLLPUBLIC_RTTI for proper RTTI
visibility for LLVM") and by making sure relevant function types do not use
incomplete types in their parameter and return types (which would make the RTTI
hidden).

Change-Id: Id7aadcbc0704b9759968ae36266fc9ce11a2e340
2015-01-26 15:17:28 +01:00
f61dbc3029 followup code removal after changing virtual methods to non-virtual
This cleanups up indentation and removes dead classes.

This is a followup patch to commit
272b1dd55797aacf511fb4342b0054e3697243f6
"new loplugin: change virtual methods to non-virtual"

Change-Id: I1c2139589cf8cb23bb9808defe22c51039d38de1
2015-01-26 08:42:29 +02:00
b44cbb26ef new loplugin: change virtual methods to non-virtual
Where we can prove that the virtual method is never overriden.

In the case of pure-virtual methods, we remove the method entirely.
Sometimes this leads to entire methods and fields being
eliminated.

Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae
2015-01-26 08:42:28 +02:00
2850b4dc39 Some more loplugin:cstylecast: tools
Change-Id: I2b540c4c0c34823143e13d16559dac7458a38933
2015-01-20 09:06:52 +01:00
c32a5a3b8e simplify Date/Time/DateTime conversion code
add constructors to Date/DateTime/Time,
that take the css::util counterparts,
to simplify code converting between these type

Change-Id: I4b03da02c63f65b6ec18cb4d6ecc3859bdef1ff7
Reviewed-on: https://gerrit.libreoffice.org/13855
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
2015-01-13 15:24:04 +00:00
278b400511 fdo#84938: convert POLY_OPTIMIZE_ #defines to 'enum class'
Change-Id: I163bd3f521473c5357c23c3ce4978f984be7b6fe
2015-01-09 09:08:35 +02:00
25e2914382 Properly change Link class to use sal_IntPtr instead of long
...follow-up to 4e41227dd6af52ec562d10efcb365defba6bd36e "mingw64: change Link
class to use sal_IntPtr instead of long;" should make obsolete
<https://gerrit.libreoffice.org/#/c/13659/> "Signed/Unsigned mismatch on x86_64
platform on windows"

Change-Id: I9fcc947bb96e104816c2820cb338fc34c528bae0
2015-01-08 14:06:24 +01:00
45ec1d9b56 brute-force find-and-remove of unused #define constants.
Change-Id: I7223530ae37297a76654cd00cc1fedb56dbe3adb
2015-01-08 10:39:36 +02:00
306f048303 fdo#84938: convert COMPRESSMODE_ #defines to 'enum class'
Change-Id: Ica501fc73e7e5f9dbd30dd9da3f337b2dc7e6f02
2015-01-07 12:53:39 +02:00
7f8f277b94 fdo#84938: convert STREAM_ #defines to 'enum class'
Change-Id: Ibbf14c7e9a5c1883c1311d4c86f948f74f8e473e
2015-01-07 11:20:44 +02:00
8130714148 fdo#84938: replace NUMBERFORMAT_INT_ constants with 'enum class'
Change-Id: I9c67de31f5571b282adc132d973b79bccb35fdc9
2015-01-05 12:57:18 +02:00
fd1372ba8b boost::unordered_map->std::unordered_map
you can get debug stl this way

Change-Id: Ia70a3e7c7c452390e8bee34975d296c9318e4a19
2015-01-02 16:14:36 +00:00
53f51e32ea drop unused defines
Change-Id: Ib3966118e5dde496f294c7ee224f4651a6192388
2014-12-31 18:10:53 +00:00
190196b98f Date/Time no longer loaded from rsc files
Change-Id: Ia9ed86b0d96cac76c2e1639065a4ac594c2966b1
2014-12-31 18:10:52 +00:00
959bcd564b various other apparently unnecessary rsc stuff
Change-Id: I745695a92023e7a14ee547ca6bef5981dd329d19
2014-12-31 18:10:52 +00:00
756fe1b298 drop dateformatter resource loading
Change-Id: Ie94c7502b0a82ca406b8d76e18def7bab8233a00
2014-12-31 18:10:51 +00:00
d21d606236 drop timeformatter resource loading
Change-Id: I11de468ab65aa4dec761fbcc1e9416528c332dd5
2014-12-31 18:10:51 +00:00
caa9278888 TimeFields not loaded from resource files anymore
Change-Id: Idf69d375eff4bfff7115e59530b37200ee79f086
2014-12-31 18:10:51 +00:00
42addf58d4 drop unused CURRENCYFIELD_ defines
Change-Id: I15fda8ab103a7cdad18ef6cc36debf983819e6f3
2014-12-31 11:45:14 +00:00
5488b315b6 splitters no longer loaded from resource files
Change-Id: I84ee0c754118882734301bf1d34c15ba640a3889
2014-12-28 12:27:40 +00:00
993fd27d3a HelpButtons no longer loaded from .rsc files
Change-Id: I0fe82e319ac44a189e93fabd932e3e0a891598d2
2014-12-22 13:55:20 +00:00
26f4e226da Typo: paremeter/paramater=>parameter
Change-Id: I26993b9cf01408803e0353e93079e56d1f57f589
2014-12-20 16:42:04 +01:00
92924b152e tools: Use appropriate OUString functions on string constants
Change-Id: If79786d21b6d7cb0cb0ec9b947f43e76aa7547e3
2014-12-18 14:12:36 +01:00
cf01aff002 remove operator>> and operator<< methods
in favour of ReadXXX/WriteXXX methods

Change-Id: I39dfeee92e5b01fdf43db3bbee0f2fc471017653
2014-12-11 14:57:34 +02:00
c2a93a21a5 long is 32 bit on Windows x86_64 platform
So that this is always wrong (on this platform) to write:

reinterpret_cast<foo>(reinterpret_cast<long>(bar))

it should be:
renterpret_cast<foo>(reinterpret_cast<sal_uIntPtr>(bar))

Change-Id: Ia286246ee1616988f755c2d2054b26efacc51af0
Reviewed-on: https://gerrit.libreoffice.org/13366
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-12-10 21:35:43 +00:00
827430c8c0 Fold URE: Windows
...assuming the delayLoadHook in cli_ure/source/native/native_bootstrap.cxx is
no longer necessary and loading of cppuhelper from the program dir cannot fail
regardless in whatever scenario the cli_cppuhelper library itself is loaded.

Change-Id: I13f32b327bca4cce9780864f5e57cdad3860afe5
2014-12-03 15:19:55 +01:00
34411dc2f0 Mark Color::AsRGBHexString() as const
Change-Id: Idf00e228c480afe2bbbb64682ed01f2c778b6d9d
2014-11-19 22:50:14 +01:00
764600bc61 Apply pimpl to ResStringArray, to hide its internals.
Change-Id: I23969735f35e221a1aad39081ee63d02066d856f
2014-11-18 21:47:10 -05:00
6d7282fa8a Apply pimpl to Fraction.
Change-Id: I60eb597a6374b807b2264af6d5841a42e9b1c0f3
2014-11-17 16:37:47 -05:00
0348341f5e Make these methods non-inline.
Change-Id: I0b24e34dec6c452659b224b45a6849dafe708c3b
2014-11-17 16:37:33 -05:00
da40cac540 Fix common typos. No automatic tools. Handmade…
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959
Reviewed-on: https://gerrit.libreoffice.org/12164
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12 11:04:11 +00:00
06bde51ced tools & vcl: move OutputDevice::ImplRotatePos() to Point::RotateAbout()
OutputDevice has a private function that rotates a point around another
point. However, there is no real reason why OutputDevice should be
responsible for this - it's really the responsibility of the Point
class in the tools module. Therefore, I've moved this functionality out
of OutputDevice and into Point, but I've renamed it from the rather
confusing name "ImplRotatePos" to "RotateAround", which is what it
actually does.

Change-Id: If12fb40a7b476653224d4edfc01887bc91a80c7d
Reviewed-on: https://gerrit.libreoffice.org/12171
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-11-01 22:18:00 +00:00
0c0e3e7539 Fixed typos. No automatic tools (sed, and so on).
Change-Id: Ia43976d84eede6f699381bc4f3daf89b95e4cb4f
Reviewed-on: https://gerrit.libreoffice.org/12150
Reviewed-by: Bryan Quigley <gquigs@gmail.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-10-30 17:16:02 +00:00
31ca7f6d71 tools: remove DBG_ERRORFILE and replace all callers
Change-Id: Ic76ccc49b9291fe82c56974eb6237cd3b85d91c8
2014-10-29 11:37:47 +01:00
2ce0aedede fdo#81356: use boost::rational internally in Fraction
Change-Id: I6f40eafee7652209395bd471e3508fe3a3d19d73
Reviewed-on: https://gerrit.libreoffice.org/12085
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-10-28 17:15:10 +00:00
0a82645c36 loplugin: cstylecast
Change-Id: Ia0f5f0d0efbe4693aba347bff32cd694117251fe
2014-10-24 08:58:05 +02:00
31af61ea09 Fraction: Revert "fdo#81356: convert Fraction to boost::rational<long> - wip"
This reverts commit 47a2d7642d249d70b5da0c330a73f3a0032e4bba.

Conflicts:

	cui/source/tabpages/transfrm.cxx
	svx/source/svdraw/svdedtv1.cxx
	svx/source/svdraw/svdibrow.cxx
	sw/source/filter/ww1/w1filter.cxx
	tools/source/generic/rational.cxx

Change-Id: I4849916f5f277a4afef0e279b0135c76b36b9d15
2014-10-23 18:34:39 +02:00
858c2a2977 Fraction: Revert "fdo#84854 it seems long is not enough on 32 bit"
This reverts commit 582ef22d3e8e30ffd58f092d37ffda30bd07bd9e.

Conflicts:

	svx/source/svdraw/svdedtv1.cxx
	svx/source/svdraw/svdibrow.cxx
	sw/source/filter/ww1/w1filter.cxx

Change-Id: I80abc7abdeddc267eaabc9f8ab49611bb3f8ae83
2014-10-23 18:34:34 +02:00
968cadb825 allow construction of BigInt from sal_Int64 on 32 bit
Change-Id: Ib68920fc9bd693d2f2679b4fc27d9956dc42fc86
2014-10-17 13:17:21 +02:00
582ef22d3e fdo#84854 it seems long is not enough on 32 bit
Fraction used BigInt internally for computations, rational does nothing
like that.

Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
2014-10-16 17:44:44 +02:00
aef6ab2098 Strip svidl down to what is still used
...the generated .ilb, .lst, and .sid outputs requested by SdiTarget were
apparently unused.

Change-Id: I1abb2abc7945070451fce4a98a11d955515e3f63
2014-10-16 08:13:33 +02:00
4e3772b1b4 fdo#75757: remove inheritance to std::map
from UniqueIndexImpl.

Change-Id: Iaa9040dff117ed5b05955c9f6eef31878dccf3b0
Reviewed-on: https://gerrit.libreoffice.org/11951
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-10-14 16:31:16 +00:00
47a2d7642d fdo#81356: convert Fraction to boost::rational<long> - wip
* 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-09 11:33:33 +00:00
a0a919d2b5 remove SvRefBase::QueryDelete
Move it's functionality into the only place that needs it, in the dbase
driver.
Removes an extra virtual call from a widely used class.
The dbase driver seems to be using to perform some kind of whacky object
recycling, so it's not like we want this functionality to be used
somewhere else.

Change-Id: I41018f71e0b0a79fdd3d527536f0ac95c788e614
Reviewed-on: https://gerrit.libreoffice.org/11786
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-09 08:18:24 +00:00
c625525ddc rename SvRef::AddRef to AddFirstRef
to make it's intended purpose clearly distinguishable from AddNextRef

Change-Id: I5da780b48b19fd873667b648031bc394113f953b
Reviewed-on: https://gerrit.libreoffice.org/11763
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-03 05:25:41 +00:00
173234f394 coverity#708208 Uninitialized scalar field
Change-Id: I5f1e889746067bad478d8fa3acd8c41c893b135a
2014-10-02 09:14:49 +01:00
fc04f76336 fdo#82577: Handle Time
Put the TOOLS Time class in the tools namespace. Avoids clash with the X11
Time typedef.

Change-Id: Iac57d5aef35e81ace1ee0d5e6d76cb278f8ad866
Reviewed-on: https://gerrit.libreoffice.org/11684
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-01 07:34:23 +00:00
c9d4a2887c fdo#82577: Handle PolyPolygon
Put the TOOLS PolyPolygon class in the tools namespace. Avoids clash with the Windows
PolyPolygon typedef.

Change-Id: I811ecbb3d55ba4ce66e4555a8586f60fcd57fb66
2014-09-30 11:47:41 +02:00
ea2d767d44 tools: change INetURLObject::getData to return std::unique_ptr
Life-cycle becomes a lot more obvious this way.

Change-Id: I1ca99607f609a2223011c40447ad1cd9ca5ccaa5
2014-09-26 16:38:34 +02:00