Commit Graph

1740 Commits

Author SHA1 Message Date
1f6aefcf2d coverity#1242531 Untrusted loop bound
Change-Id: I94308a517028a62ecf7018f6d7a4e9d37c0f56a6
2014-10-28 15:06:31 +00:00
91fac2a32c cid#705051 Dereference after null check
Change-Id: I6b7adb593efa137bb09b3b8d49539f6cd405dd20
2014-10-27 15:32:55 +02:00
530334a27e Explicitly include the cmath std::abs overloads
Change-Id: I501edd8f3301f70e6130d844dcd64cac8b18598f
2014-10-24 16:25:47 +02:00
6a4b976bd0 Fix Fraction(-2147483648.0) for 32-bit wide long
Change-Id: I6465377de1edff5d0ccc0049fb6d24f6f1223fd2
2014-10-24 16:10:54 +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
dc90c5a395 Fraction: Revert "just check if the fraction is < 0"
This reverts commit 8afab33d161ddd39a3e6094b5daa08b156ef0421.
2014-10-23 18:34:36 +02:00
b66aad4084 Fraction: Revert "simplify condition"
This reverts commit ad1f796b1dc710a02ade17c95e99d11412f1280a.
2014-10-23 18:34:36 +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
5be04f59c9 coverity#440777 Resource leak in object
rework to avoid the warning

Change-Id: Id104c01b04e07ffaaf503a842c978acbc8a22a19
2014-10-23 14:54:51 +01:00
4b71bb35a7 work around windows whining
Change-Id: If2922bca25c93edc25e1171001def8ce3011cf4c
2014-10-18 20:55:01 -05:00
5cdede38ff now why did i do this?
Change-Id: Icf1fc5643271672761b565c30382e70c689c29b4
2014-10-17 22:02:32 +02:00
bac6e18d68 fix long long -> BigInt for LONG_MAX value
Change-Id: I1cf551299bae925b5a5cf0a488b6cc3497d010bf
2014-10-17 21:45:21 +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
ad1f796b1d simplify condition
Change-Id: Idceac888c57cc27142877d0cf83dd525ab3f92ca
2014-10-14 17:56:23 +02:00
8afab33d16 just check if the fraction is < 0
Change-Id: I23f631898f29d8285d3da333686da8d3f28a00f8
2014-10-14 17:56:23 +02:00
157fb92164 initialize nPolyCount
Change-Id: I774f0ea2576063b7d1f7005e7df41ae52fa9037c
2014-10-11 17:33:50 +01:00
51f7c69f4f coverity#1240260 Operands don't affect result
see can we silence these false positives

coverity#1240259 Operands don't affect result
coverity#1240254 Operands don't affect result
coverity#1240264 Operands don't affect result
coverity#1240267 Operands don't affect result

Change-Id: Ieca40474c231e33a516b70f7693346ac73babd61
2014-10-10 12:50:20 +01: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
8fa0cda004 coverity#705326 deliberate fallthrough in switch
I imagine its deliberate anyway, always has been
this way since 2000

Change-Id: I45fd654aeec2a5c753c38d20febd2f820044bb32
2014-10-08 20:45:13 +01: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
0f64ec11a3 WaE: implicit conversion of NULL constant to 'nullptr_t'
Change-Id: I47ebbac21f48854eb737dd7e8119bd863a5d7ed9
2014-09-26 20:25:29 +03: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
5501c8d222 remove unnecessary casts in calls to SvStream.WriteUInt16
left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: I482ca7abb84613971e7e8f839f7aa67a65cd71ff
2014-09-26 15:26:48 +02:00
bec72dd34f remove unnecessary casts in calls to SvStream.WriteUChar
left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: I2ea4c7d97e745b3e6a3834f41ac7bfefa4883c7a
2014-09-26 15:26:19 +02:00
c476a84abd remove pointless comments
Change-Id: I8edfe830b8f6ca7f1809332870e06d1d286b90e8
2014-09-26 15:25:40 +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
8f684e21de remove unnecessary static_cast's
left over from our conversion of the SvStream output operators
to more specific methods
e Please enter the commit message for your changes. Lines starting

Change-Id: Ibfe7635451ef7b8813d7a59c78c5223092a17ad5
2014-09-26 15:25:40 +02:00
ebdc36c12d SvStream - rename WriteNumber methods
to Write?Int32AsString. Since the original name was so generic as
to be meaningless.

Change-Id: Iaaaf592904af51f2b9988fa8efb344c1b2bf9b0f
2014-09-26 15:25:39 +02:00
ed085a6d20 cleanup GUID/ClsId/CLSID types
- rename GUID to SvGUID so we don't need an #ifdef WIN32
- drop ClsId struct, since it is used interchangeably with GUID and has
the same structure

Change-Id: Idf5c14c82a6861ef585fb57896a9b12cfe40374c
2014-09-26 13:13:42 +02:00
d68ce6e173 fdo#84000: Sort out problems with short timeouts & long callbacks.
Previously, the timer events could have accumulated in that scenario leading
to unresponsiveness to user events.

Change-Id: I455d726ae7475f7dbf98d871c54d8c156cb64e52
2014-09-25 21:57:37 +02:00
9703cc63ce Remove o3tl/heap_ptr.hxx, use std::unique_ptr instead
Change-Id: Iac70c9be13892a36bfb5975f62e5345b88d4f144
2014-09-24 14:54:51 +02:00
211b3192f0 fdo#84000: Reimplement the Windows WinSalTimer using Timer Queues.
Timer Queues

http://msdn.microsoft.com/en-us/library/windows/desktop/ms686796%28v=vs.85%29.aspx

allow creating & maintaing high-precision timers.  This commit switches the
WinSalTimer implementation from using the Timers:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms644900%28v=vs.85%29.aspx

to Timer Queue Timers.

The 'classic' Timers do not have better precision than some 15.6ms (the
documentation mentions 10ms, but some measuring seems to confirm that it is
more than that).

With the Timer Queue Timers, we now have 1ms precision.

Incorporates some cleanup from Michael Meeks <michael.meeks@collabora.com>.

Change-Id: I0312a0c9fdc2779258698b24389b24c39e643473
2014-09-23 21:30:47 +01:00
23e1fc277d loplugin: cstylecast, update PTR_CAST macro to use static_cast
I introduce a template method into the PTR_CAST machinery
to maintain constness.
There is now a FIXME in sd/../docshell.cxx because I needed
to use a dynamic_cast there to work around the games it appears
to be playing with OLE in-place activation.

Signed-off-by: Stephan Bergmann <sbergman@redhat.com>,
dropping the GCC-extension, unnecessary use of typeof from tools/rtti.hxx

Change-Id: Iba5ace1aa27e02b34fcc91af1e658c43371afd03
2014-09-23 17:27:47 +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
fd64d444b7 clip PolyPolygon::Insert on .svm load
valgrind + bff

Change-Id: Ib3ed8a6e518c0686f8cbeaf021b9ca3a07005032
2014-09-10 14:42:19 +01:00
6492c8576e Make the "Mac-like" or "canonical" app bundle structure always used on OS X
In other words, only executable files go in the MacOS folder. Dynamic
libraries and bundled frameworks (i.e., LibreOfficePython), and
nothing else, go in the Frameworks folder, and all other files go in
the Resources folder.

Especially, note that Java class files and rc (.ini) files also go in
Resources.

Such an app bundle structure is what Apple strongly suggests one
should use, and it has been hinted that future versions of code
signing and/or Gatekeeper will require such a structure.

There is still some ugliness thanks to traces of the historical
separation of URE from "the office". Like there are two separate
"unorc" files, one for URE, one for the LibreOffice application. IMHO,
this should be cleaned up, but is probably controversial.

(Eek! I now see there are actually *three* unorc files in the app
bundle. Not intentional. Need to fix that later.)

Change-Id: Idcf235038deb5b8e1d061734993e9f31869b7606
2014-09-09 13:55:23 +03:00
0a8bf4b534 FloatingWindows are no longer loaded from resource files
Change-Id: I2705bbb4db52779e0065400f09604384fd9cf151
2014-09-06 07:02:42 +01:00
ca68971f0a ModalDialogs no longer loaded from resource files
Change-Id: I2d208c7cc5ff9bf26bff5ab2aa40e0bf57373342
2014-08-26 17:00:21 +01:00
10d14a94d1 tools: make some variable names more clear
Change-Id: I5eb2428f4c71e5aa9bfc0bf71c06d87be039ad3b
2014-08-24 16:15:51 +10:00
3f89eccf7e Do not cripple intermediate values to sal_uInt16
Change-Id: I5d39bebbd55cc3170ff52459731fad333a2e92f9
2014-08-22 17:30:03 +02:00
afa5d63e2a TabPages are no longer loaded from resource files
Change-Id: I009e0f388cfe1861cef89d2148a02380dd47c1ff
2014-08-20 16:35:09 +01:00
b3d9852309 Remove more useless includes of tools/debug.hxx
Change-Id: If289dcbff125ac0088f01b5c9752f9f3173585dc
Reviewed-on: https://gerrit.libreoffice.org/11020
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-08-20 09:10:01 -05:00
1c13f9c2b6 RSC_TRISTATEBOX is no longer used
Change-Id: Ib3f43db131cf5562ad011538873c2ee51839665c
2014-08-16 18:36:24 +01:00