Commit Graph

1776 Commits

Author SHA1 Message Date
182fc4f184 fdo#84938: replace WINDOW_BORDER constants with enum
Change-Id: I91ca8e09971aee26f16257a4fd01125cfb2ebcdb
2014-10-21 09:06:40 +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
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
04a810cee4 back out more wrong and confusing tools::Time comment changes
Apparently fc04f76336fdf8c96e35382cdeb497e2f939705c used some sed script
to change all ...

Change-Id: Ie609bd02a2c5d70109fc6185cf4440480f29d8f5
2014-10-08 14:24:21 +02:00
ad5e8b30ac fix for invalid dynamic_cast
after my loplugin-cstylecast commits.
this is a follow on to the bug reported in fdo#84608

Change-Id: Icc4f4baf3690e939c07a71a949200270bf1f4614
2014-10-04 20:13:07 +02: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
8dbde0845a fdo#82577: Handle Region
Put the VCL Region class in the vcl namespace. Avoids clash with the X11
Region typedef.

Change-Id: I6e008111df7cf37121fbc3eaabd44a8306338291
2014-09-30 09:58:23 +02:00
1467751fd8 toolkit: std::auto_ptr -> std::unique_ptr
Change-Id: I4566a0b7215b729f04591bed0ad5bed42f71f227
2014-09-29 18:37:50 +02:00
00bd457156 loplugin: cstylecast
Change-Id: I20358c271e32b4af11d3258c950bde836596933a
2014-09-29 12:50:36 +02:00
d46b16e1e4 remove unnecessary casts's
left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: I63f18be8e940098c2acbbc73ee49ede3a949fcb2
2014-09-26 15:25:40 +02:00
c91dec0dad comphelper: std::auto_ptr -> std::unique_ptr
Change-Id: I364d6252f470dcc6d71a191f1249e95ca1f284ce
2014-09-25 08:40:11 +02:00
827c46e7d7 fdo#82577: Handle Window
Put the VCL Window class in the vcl namespace. Avoids clash with the X11
Window typedef.

Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2014-09-23 14:11:39 +03:00
60e78fbb80 fdo#82577: Handle Font
Put the VCL Font class in the vcl namespace. Avoids clash with the X11
Font typedef.

Change-Id: I1a84f7cad8b31697b9860a3418f7dff794ff6537
2014-09-18 08:54:37 +02:00
69ac0fa53b toolkit: sal_Bool -> bool
Change-Id: I8819d408e8556bbf38605c2feef2fa87d8dd41c3
2014-09-12 10:04:59 +02:00
037d03b9fa Typo: (N|n)ormaly->(N|n)ormally
Change-Id: I96d081f394b0b62d99ec1034bf5e99da9aedd9d9
2014-09-10 22:35:39 +02:00
7af850c896 vcl: sal_Bool -> bool
Change-Id: Iff4da6d6281eb9194db348ebc10fbe7718538401
2014-09-10 08:36:06 +02:00
57a4337e25 set names on a bunch more threads...
Change-Id: I4c2f2f0bcce52839033876ec991529721e06a3c8
2014-08-25 13:21:59 +02:00
30ae83c268 fdo#82577: Handle KeyCode
Put the VCL KeyCode class in the vcl namespace. Avoids clash with the X11
KeyCode typedef.

Change-Id: I624c9d937f7c5f5986d313b6c5f060bd8bb7e028
2014-08-23 22:33:30 +03:00
7e2b9fa213 Remove some useless tools/debug.hxx includes
Also remove the tools/solar.h included from tools/debug.hxx. The include of solar.h
header was necessary in some cases because of a macro or a typedef that was needed.

Change-Id: Ia6e15d5c2571c58c9e9138b0d0a7f08ae88053c9
Reviewed-on: https://gerrit.libreoffice.org/11075
Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Tested-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2014-08-22 16:33:18 -05:00
1579d8ed79 Avoid incomplete type in fn sig to keep ubsan's RTTI-based checks happy
Change-Id: I536353b86ee023eb630ea89786d2205a628d95e3
2014-08-07 18:42:35 +02:00
cd3d26b7ed vcl consitent use of long for corrdinate
most of length in vcl are calculated in 'long'
but array of X position tend to be in sal_Int32.
As a prep work to be able to support 'double'
as the base type of Device Coordinate, harmonize
the use of 'long' for non-float coordinate.

Change-Id: I7cb33301ff6a5e2c62247b36a4e07e168a58a323
2014-07-20 22:10:59 +02:00
bce99945d8 coverity#736076 Missing break in switch, its got to be wrong
Change-Id: I21a3b2b794a431d07df8a1bc250e8f0aacaf3059
2014-07-11 16:40:30 +01:00
dac4ca5f68 new loplugin: externalandnotdefined
Find "missing headers," where a function is declared directly in the
.cxx (as extern) and not defined, and should arguably instead be declared
in an include file.

Change-Id: I6d83ee432b2ab0cd050aec2b27c3658d32ac02a2
2014-07-11 14:12:25 +02:00
ea91310384 use SimpleReferenceObject in accessibility
to replace hand-rolled version

Change-Id: I9dd8d02024702972722b43f2654db91eb3da3794
2014-07-08 08:56:18 +02:00
4228f08d60 use assert when followed by deref
Change-Id: I8405e4d8f9fa1de3ef6ee474321b4ac2b4ce1624
2014-07-03 12:49:38 +01:00
7dda48d56f Related: fdo#80633 cache optimal size
Change-Id: Ic2c3aefebd3061d294f339c6d262a3c3e381fbe4
2014-07-01 16:43:05 +01:00
95dca00a91 coverity#707416 Uncaught exception
Change-Id: I7c67c62622e2b46bc565ae148c1605f4954ffa39
2014-07-01 10:56:15 +01:00
4523dd0544 Called C++ object pointer is null
Change-Id: I88efc4be6ff869ef97a2b398d43f7b7914debfc6
2014-06-30 09:46:16 +01:00
9a741fcad4 loplugin:unreffun: also warn about unused function templates
Change-Id: I4a6280f47ca3c4a77b4e42fe05d79ded7fc30ef1
2014-06-27 07:51:51 +02:00
0de1e3a015 remove spurious com::sun::chaos
Apparently some time before inital CVS import a global
search-and-replace went horribly wrong and added spurious namespace
prefixes everywhere.

Change-Id: I4009bc3ab4b1d4c80412f75ad0e4628a382f99f0
2014-06-25 15:04:46 +02:00
22357c172f coverity#705322 Missing break in switch, assuming incorrect
especially because the setProperty logic now matches the getPropery one

Change-Id: I7ebeabc9defed00d1853c3b91fbbf592e1940aa8
2014-06-24 14:28:27 +01:00
47088ac9a0 Missing SolarMutexGuards
...as can be seen e.g. with CppunitTest_dbaccess_dialog_save:

vcl::DisplayConnection::start
Application::GetDisplayConnection
Window::GetDragSource
Window::GetDropTarget
(anonymous namespace)::VCLXToolkit::getDropTarget
(anonymous namespace)::Frame::implts_startWindowListening
(anonymous namespace)::Frame::initialize
(anonymous namespace)::TaskCreatorService::implts_createFrame
(anonymous namespace)::TaskCreatorService::createInstanceWithArguments
framework::TaskCreator::createTask
framework::Desktop::findFrame
framework::LoadEnv::impl_loadContent
framework::LoadEnv::startLoading
framework::LoadEnv::loadComponentFromURL
framework::Desktop::loadComponentFromURL
unotest::MacrosTest::loadFromDesktop
DialogSaveTest::test
...

Change-Id: I9523ea47cab23d1f23f73a37d2d44453aa7d56a3
2014-06-18 15:51:27 +02:00
d656138b12 loplugin:staticcall
Change-Id: I9e643bd43e6e0f027a7e17b2d5d867c0cb452052
2014-06-13 17:54:35 +02:00
1817366cb5 gbuild: remove config_libraries.h and gb_Helper_generate_config_libraries
This much ugly complexity, generating a header on every gbuild startup
etc. is really not warranted for 6 callers of the generated macros.
Also, the Win32 make has problems with the quoting.

Change-Id: If945e09c1730e52174a6084677842dc611d66b2f
2014-06-09 17:05:50 +02:00
abf842e4b1 coverity#705323 Missing break in switch, assuming its intentional
Change-Id: Ibb8fe4e1d13a24f810fbdf4978606c35890a9cfd
2014-06-05 13:35:53 +01:00
b6c67082c0 toolkit: remove SAL_THROW macro
Change-Id: Id9e27c6cbcdc0c229a0dc2a3ad075d62121e6c5d
2014-06-05 08:17:47 +02:00
d5bafdddf8 coverity#705387 Mixing enum types
Change-Id: Iaba60d05b73ca3229aa8b35b338ee54381efd2d3
2014-06-04 12:34:14 +01:00
3d8eee45c9 coverity#705388 Mixing enum types
Change-Id: If80361ac234c5079c9fcadb0a2f5fa05ea6b407b
2014-06-04 12:34:14 +01:00
158672fda5 fdo#68849: Add header guards to all include files
Added header guards to files in directories toolkit/, and ucb/

Change-Id: Ia7ea7d6fad685c7648db22455b5587cf6260318d
Reviewed-on: https://gerrit.libreoffice.org/9595
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-06-01 16:14:18 +00:00
ef530d0a2c fdo#75364 flat style and 3d style were swapped
Change-Id: I929f8f63e8017727595be30f4e56f3aabeec2b1e
Reviewed-on: https://gerrit.libreoffice.org/9549
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2014-05-29 10:52:42 -05:00
f0ae48b684 remove unnecessary NULL parameter passed to UNO Exception
.. now that we have a default value for that parameter

Change-Id: I54d6b0a0a01ce2f2e5168ada0c427424de0477bc
2014-05-29 09:01:40 +02:00
0f2824b117 remove more unnecessary use of OUString constructor
Change-Id: Iae14cb3df65295b6894fd9e05411c5698e9c8aba
2014-05-27 08:20:12 +02:00
3b24dcc8a8 Remove unnecessary semicolons
A simplified version of the semantic match that finds this problem is
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r1@
statement S;
position p,p1;
@@
S@p1;@p

@script:python r2@
p << r1.p;
p1 << r1.p1;
@@
if p[0].line != p1[0].line_end:
    cocci.include_match(False)
@@
position r1.p;
@@
-;@p
// </smpl>

Change-Id: Ib9708d37fbb4c6060f88d5dae3814a2d37b2091e
Reviewed-on: https://gerrit.libreoffice.org/9493
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-27 01:19:00 -05:00
ac76cc7e60 Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part20
Change-Id: If87cdfb2c605254f6d69baa4ca5aec09091caa68
2014-05-23 22:11:52 +02:00
5350520ec8 Resolves: #i98216# extract boolean value for AutoFill value of ComboBox model
(cherry picked from commit 213aafbf006a5099e951f65a472e4f8fa66256a4)

Change-Id: I862abc31b69b98f0ec766ca260fdc063d14a2ee4
2014-05-16 11:54:08 +01:00
68741d0055 Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part13
Change-Id: Ieecfd7ccb10c75ac639d0ba8e7cb588607097c2a
2014-05-15 22:52:22 +02:00
7249ba6877 remove external header guards
that's the problem with those: none of them was actually defined...

Change-Id: I496140e43cf8ff8a5712394023d98516aaf21adc
2014-05-14 18:12:57 +02:00
93f5d5a919 The opaque PostUserEvent IDs are actually pointers
...so declare them as such.  This avoids the recurring mistake of storing such
IDs as sal_uInt32, truncating in 64 bit environments, causing RemoveUserEvent to
potentially not remove the event, it thus firing "too late" and probably causing
a crash.

While at it, consolidate the trivially unnecessary overloads of both
Application::PostUserEvent and Window::PostUserEvent.  And in each of them, it
looks like deleting the mpLink member was missing from the failure branch.

Change-Id: Iab13afbb06e12ac15dec6a6b5b85a7e402a3c654
2014-05-07 11:49:46 +02:00
127a5f5e12 Sequence<UnoUnsignedShortType> -> UnoSequenceType<UnoUnsignedShortType>
Change-Id: I94fb4e0c76cc0cac2b6cf3a356e8fd9ffb76a1af
2014-05-06 23:06:59 +02:00