Commit Graph

10786 Commits

Author SHA1 Message Date
90da361cbc coverity#706465 Uncaught exception
Change-Id: Ic328c8a68fac462c402b70f85093cd8b14d2882d
2014-10-28 10:31:25 +00:00
7ef698355a fdo#84938: replace KEYTYPE_ constants with enum
Change-Id: I563cf96f8ca815d6c8ad9f5fe365fc7ce7a2a328
Reviewed-on: https://gerrit.libreoffice.org/12104
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-27 08:09:35 +00: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
035fe8a6aa fdo#84938: replace MENUITEM constants with enum
Change-Id: I7b0085af3b13bd6e1a50bf1e0e986d1524b52d7b
2014-10-23 12:55:35 +02:00
d4ca0cc293 loplugin: cstylecast
Change-Id: I0eaeebad6be75a1c0cccdf90955fde1a2909bdba
2014-10-23 12:36:14 +02:00
9ecac3874d Replace DISABLE_SCRIPTING with HAVE_FEATURE_SCRIPTING
Feature test macros that govern conditional compilation should be
defined in config_*.h include files, not on the compilation command
line.

Change-Id: I40575a4762fd2564f10927b6f38a112dd9f9a3d7
2014-10-22 09:30:23 +03:00
666ec98b7e dbaccess: surely the problem is that the storage could _not_ be committed?
Change-Id: I03e7e09e185e9cb25868c86de0b402b89e7f5d75
2014-10-21 15:06:41 +02:00
182fc4f184 fdo#84938: replace WINDOW_BORDER constants with enum
Change-Id: I91ca8e09971aee26f16257a4fd01125cfb2ebcdb
2014-10-21 09:06:40 +02:00
67c9d05451 fdo#84938: replace TIB_ constants with enum
Change-Id: I435ce2331fb49e7ce9fe97bdfddfaef706759a84
Reviewed-on: https://gerrit.libreoffice.org/12023
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-20 07:16:46 +00: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
ad9498f8b8 More -Werror,-Wunused-private-field
...detected with a modified trunk Clang with

> Index: lib/Sema/SemaDeclCXX.cpp
> ===================================================================
> --- lib/Sema/SemaDeclCXX.cpp	(revision 219190)
> +++ lib/Sema/SemaDeclCXX.cpp	(working copy)
> @@ -1917,9 +1917,10 @@
>    const Type *T = FD.getType()->getBaseElementTypeUnsafe();
>    // FIXME: Destruction of ObjC lifetime types has side-effects.
>    if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl())
> -    return !RD->isCompleteDefinition() ||
> -           !RD->hasTrivialDefaultConstructor() ||
> -           !RD->hasTrivialDestructor();
> +    return !RD->hasAttr<WarnUnusedAttr>() &&
> +           (!RD->isCompleteDefinition() ||
> +            !RD->hasTrivialDefaultConstructor() ||
> +            !RD->hasTrivialDestructor());
>    return false;
>  }
>
> @@ -3517,9 +3518,11 @@
>    bool addFieldInitializer(CXXCtorInitializer *Init) {
>      AllToInit.push_back(Init);
>
> +#if 0
>      // Check whether this initializer makes the field "used".
>      if (Init->getInit()->HasSideEffects(S.Context))
>        S.UnusedPrivateFields.remove(Init->getAnyMember());
> +#endif
>
>      return false;
>    }

to warn about members of SAL_WARN_UNUSED-annotated class types, and warn about
initializations with side effects (cf.
<http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039602.html>
"-Wunused-private-field distracted by side effects").

Change-Id: I3f3181c4eb8180ca28e1fa3dffc9dbe1002c6628
2014-10-15 15:58:56 +02:00
af5ebbf783 create a macro library for implementing bit-flags types
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>,
changed from a macro- to a template-based solution.  (Unfortunately MSVC 2012
does not support explicit conversion operators.  Worked around that with
explicit #ifs rather than some HAVE_EXPLICIT_CONVERSION_OPERATORS and
SAL_EXPLICIT_CONVERSION_OPERATOR ainticipating we hopefully soon move to a
baseline that requires unconditional support for them.)

Change-Id: I4a89643b218d247e8e4a861faba458ec6dfe1396
2014-10-13 17:45:57 +02:00
246cd66af2 coverity#706421 Uncaught exception
Change-Id: I91a6ac9d9bda0ea25f1f5385bbac71ea9d22d573
2014-10-12 16:39:56 +01:00
e7d3f4b704 coverity#706404 Uncaught exception
Change-Id: I7717b61e89d95cb6d89bb273c22c0503b0853d96
2014-10-12 16:39:56 +01:00
aeac20e7bd coverity#706478 Uncaught exception
Change-Id: Ie37ebac80afb3e52668ae6ebeeb61eaddc892ef6
2014-10-12 16:39:55 +01:00
92a65bd466 coverity#706476 Uncaught exception
Change-Id: I1461c99fccb57ccf5375e372e50948b0b355d4bb
2014-10-12 16:39:55 +01:00
f2747a0354 coverity#706477 Uncaught exception
Change-Id: If44507458f8473d6fede3e430e69620f8fb1d698
2014-10-12 16:39:55 +01:00
cb7ede2d99 convert vcl StateChangedType to enum class
Change-Id: Ifa46523619ae7fb8d112525b8df594836e51bb8f
Reviewed-on: https://gerrit.libreoffice.org/11843
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-11 15:14:32 +00:00
ee12e843c6 fdo#84073: change ODBC/JDBC escapes to lowercase
Change-Id: I19ce3acb9575fbef8273bbd84cb4dc322e101ac8
2014-10-09 18:22:15 +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
195674627c fdo#84658 on reexec, cancel modification before resetting IsModification state
Change-Id: I878bff4d36ca1c2dd9474c937b03d0b366a6e911
2014-10-06 12:23:22 +02:00
bfe345e8b7 coverity#1242480 Dereference null return value
Change-Id: I9818e647915bd2b973c617feb7efd256621cf2de
2014-10-03 16:30:33 +01:00
a28e7f7aa9 loplugin: cstylecast
Change-Id: Ie478d1fcfd3b64d7a2128887c216b5e0b4501ab9
2014-10-03 15:20:04 +02: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
6d96902a3e coverity#1242747 Uninitialized pointer field
Change-Id: I1530d071ad44afc114f1916bf234e0616b7dce90
2014-10-01 20:29:03 +01: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
9755653991 MSVC 2012 apparently isn't ready yet for std::vector<std::unique_ptr<T>>
...producing error messages about trying to access private undefined unique_ptr
copy ctor etc.

Partial revert of 014e7933af751bfe0a03867373b82efa806f3a3d "svtools:
std::auto_ptr -> std::unique_ptr: ...changing HTMLOptions to
std::vector<std::unique_ptr<...>> because boost::ptr_vector<...>::push_back only
supports auto_ptr, not unique_ptr," going the awkward

  std::unique_ptr x(...);
  push_back(x.get());
  x.release();

route instead (which could be simplified if boost::ptr_vector::push_back ever
started to support unique_ptr).

Change-Id: I15693030a0bbfdedbfdfbe76ede5d0c74f4e5b41
2014-09-29 15:27:46 +02:00
014e7933af svtools: std::auto_ptr -> std::unique_ptr
...changing HTMLOptions to std::vector<std::unique_ptr<...>> because
boost::ptr_vector<...>::push_back only supports auto_ptr, not unique_ptr.

Change-Id: Ie5f92bc40ce5425dc1c634b17addc2b0dd9bbda3
2014-09-29 13:57:17 +02:00
173e017209 factorise odbc headers inclusion
it is complicated enough that we should implement that logic only once

Change-Id: I0cc5ffb871223b27df825f21612e3c8f6f2febb3
2014-09-26 18:25:56 +02:00
04fd62096f remove unnecessary casts in calls to SvStream.WriteInt32
left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: I0c0172519479be0535a447e41a592fbf782751bd
2014-09-26 15:27:17 +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
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
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
cf49392511 dbaccess: C2668: ambiguous call to overloaded function
Change-Id: I49522f0cd3c5749a5a0116e134fa2a93bd3e50c3
2014-09-25 13:12:38 +02:00
d54a72a408 dbaccess: std::auto_ptr -> std::unique_ptr
Change-Id: I2b27aaf589fcbe4da1680f624a57be7ae62b0dc5
2014-09-25 08:40:12 +02:00
97bad49ffa Add missing include to avoid compile error on windows
Change-Id: If338b41e416362fc36da25b16f119187a358206c
Reviewed-on: https://gerrit.libreoffice.org/11617
Reviewed-by: Matúš Kukan <matus.kukan@collabora.com>
Tested-by: Matúš Kukan <matus.kukan@collabora.com>
2014-09-24 06:22:01 +00: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
32b46b74f2 Resolves: #i121492# Base can not filter by dates
Patch by: hanya
Fixed date filter problems in table view. Now processes old style date format
and "normal" for database as expected.

(cherry picked from commit 79ff7fc76c74a012933230d6f3c37977eccc6398)

Conflicts:
	dbaccess/source/core/api/SingleSelectQueryComposer.cxx

Change-Id: I2ae1b50b9e85ff2c543aaea90894a7edd5bc7524
2014-09-22 10:23:53 +01: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
a762204a5d Typos
Change-Id: Icf850c4b7b146a82a5638a3cd88ad02f3171aff3
2014-09-17 21:15:33 +02:00
b396ae62f7 dbaccess: sal_Bool -> bool
Change-Id: Ifad71823e72be71cbd9f9f58a51f4553ff54e4d4
2014-09-12 16:15:27 +02:00
037d03b9fa Typo: (N|n)ormaly->(N|n)ormally
Change-Id: I96d081f394b0b62d99ec1034bf5e99da9aedd9d9
2014-09-10 22:35:39 +02:00
df5c888701 Resolves: fdo#83678 no thousand seperator for port numbers
Change-Id: Ia3544c1700d71b0df63b65fe25d28cde54ad8f57
2014-09-09 17:19:25 +01:00
3fc1e691c5 Resolves: fdo#83501 STR_QUERY_* populate the join dialog
Change-Id: Id4cff969297009c9f9cd3323ac01c743b29ca6c4
2014-09-08 15:53:17 +01:00
481cd6368b Related #82088: removed last css aliases in hxx
* Only unfixed header namespace alias in
  ConnectionLog.hxx:
  LogLevel = ::com::sun::logging::LogLevel

Change-Id: I48c941a4762830f2265c8241f4c1695a43ec891a
Reviewed-on: https://gerrit.libreoffice.org/11333
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-09-08 03:02:57 -05:00
4233cba407 document oddity by comment
Change-Id: I4c4637c9b1ae7329b9872da74dd8542b2fda5dd2
2014-09-05 16:06:28 +02:00
dcbd4c636b yet another overrun access of an empty OUString
no impact in release build but triiger assert in debug

Change-Id: I037cf127ff55c03dbc5e151d1373cfb4f6219848
2014-09-05 12:44:40 +02:00
ec87541838 resource files: remove unused definitions
Change-Id: Ic782eab6943aa8e659acfceb9f20dac76224c258
2014-09-05 04:06:34 +02:00