Commit Graph

8241 Commits

Author SHA1 Message Date
5651dd471e coverity#1157745 Unchecked return value
Change-Id: I06e8e946063dc54335f3b672105d5cd0b3ff71a4
2014-10-28 15:06:35 +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
035fe8a6aa fdo#84938: replace MENUITEM constants with enum
Change-Id: I7b0085af3b13bd6e1a50bf1e0e986d1524b52d7b
2014-10-23 12:55:35 +02:00
3f89f88651 callcatcher: lots more unused post ww1 filter removal
Change-Id: I7bf6dc1d366093e797a19a8e555103c15b311ac8
2014-10-23 11:13:25 +01:00
9bdca0019b crash in tools->options->advanced
regression from...

commit 06562c678410e425de629109ce92933c2d89a8f6
Date:   Sat Oct 18 10:36:36 2014 +0200

    convert SV_BMP_ constants to enum

    Change-Id: I46cb7f649fa44d8967e0e7da03583157d2706f05
    Reviewed-on: https://gerrit.libreoffice.org/12018
    Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
    Tested-by: Noel Grandin <noelgrandin@gmail.com>

Change-Id: I29486e8fe17d9e06e01c33f93d99ffc6ae3d017c
2014-10-20 17:19:09 +01: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
06562c6784 convert SV_BMP_ constants to enum
Change-Id: I46cb7f649fa44d8967e0e7da03583157d2706f05
Reviewed-on: https://gerrit.libreoffice.org/12018
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-18 18:18:48 +00:00
dbfd932e08 coverity#1247633 Uncaught exception
Change-Id: I4058089f45b39ddacc56ccf2259ce6e939abe4ee
2014-10-17 15:19:45 +01: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
d9fa1247be fdo#84938: replace SYMBOL_TYPE constants with enum
Change-Id: Ib3763f20d74c22e28d519a9ac47f6f3ab4e31f51
Reviewed-on: https://gerrit.libreoffice.org/11983
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-15 10:13:04 +00:00
ff7c2cd0dc Resolves: fdo#84887 TabBar::ImplShowPage crash
Change-Id: I84250c6a40baeabd0d12958dfe0aea346d2b4fc8
2014-10-14 17:13:43 +01:00
fa6ac05bea fdo#84938 - replace LIST_ACTION constants with enum
Change-Id: I21c05ada0a793b1e3ddf87481e66b60b83529767
2014-10-14 09:09:33 +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
f6d61562d4 vcl: Make ImplFontCharMap a pImpl and move functions to FontCharMap
To do this, I've made FontCharMap a friend class for ImplFontCharMap,
and have moved the functions directly into FontCharMap. In this patch,
I am attempting to stop the direct use of ImplFontCharMap by anything
other than FontCharMap. However, FontCharMap itself requires a
refcounter, so we will use FontCharMapPtr to access the font character
map.

Change-Id: I509b990a8cbd911c5cc1572c7d24fc5348ca06d9
Reviewed-on: https://gerrit.libreoffice.org/11823
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-10-13 09:19:04 +00: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
fef9bf4e39 Resolves: fdo#82270 Grabbing focus can invalidate the entries
Change-Id: Ie9b4f936cebdcf2a37e66abef456c6b0c0e26201
2014-10-09 13:51:18 +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
11d22e164e cid#1194925 Resource leak
reorganise the code to keep coverity happy

Change-Id: I18fc2dfd17f97edf1d17c57caaed4cc9d2fedd13
2014-10-03 15:18:46 +02:00
9d6c648d54 coverity#704318 Logically dead code
Change-Id: I591188e0323bb75c55cad9a078eea188f79b3a03
2014-10-03 09:07:55 +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
268b9c10c9 fdo#84592 Fix wrong background color in lists
Change-Id: Ie154bfb15a19ae98b2bc4eb6626240a00cf182d4
2014-10-03 00:00:39 +02:00
0c2b43b707 Improved striped rows implementation
Some renaming, use variable for row background when not striped

Change-Id: I5b36fc751aa163dbb127406d7aefad01974fa371
2014-10-02 00:59:24 +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
0ada00bd9b Improve SvTreeListBox class
It is possible to set alternating rows. Expert Configuration
dialog use it.

Change-Id: Ie43a87ca05be73fdb345fa4866f31c2c36b7cdf1
Reviewed-on: https://gerrit.libreoffice.org/11663
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2014-09-30 21:00:59 +00:00
741629f48a Some glue for using std::unique_ptr with the Boost Pointer Container Library
Change-Id: Ie975e963ed64fb96542a9771f85eef72d8266496
2014-09-30 17:51:30 +02: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
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
0ecf6afbd1 loplugin: cstylecast
Change-Id: Iea517d2287bded4a702c73dfdd1f182023425d67
2014-09-29 12:50:35 +02:00
4e26b91568 remove unnecessary casts in misc calls to SvStream.Write*
left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: Ib80032e8626f5476a89b958f590441994594f4e4
2014-09-26 15:27:18 +02:00
5cefde06ea remove unnecessary casts in calls to SvStream.WriteUInt32
left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: I1d848f19f82783e6eabf2da37dbde78fe36ea1e0
2014-09-26 15:27:17 +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
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
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
827ae65e85 Resolves: fdo#83943 avoid infinite recursion
when attempting to make a cell visible when
the parent simply isn't large enough to show
any part of the cell

Change-Id: I987c9b3be30a66a5e1e27ad9e452f2ca65330d9e
2014-09-26 13:12: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
3aa99295a7 html: add applyEvents to HTML output
Change-Id: I8cc2d752673254c0f23f63030a8fa7d4d288c0a9
2014-09-22 00:31:48 +02:00
d42813db53 Extend HTMLWriter: flush the stack, more values for attribute(..)
Change-Id: I733426ba5f82ee25751387f88942dbc66689821d
2014-09-22 00:31:47 +02:00
efcdf9004d callcatcher: update unused code
Change-Id: I3010bdd736c15a086f3ce61cacbb34159f0b2abf
2014-09-18 14:12:21 +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
636dd4aba3 add Kven Finnish [fkv-NO] to language list, fdo#83332
Change-Id: I3faa39ebc32e909bd2e7eeee6ae67c6f3148fb7c
2014-09-17 18:45:40 +02:00
d49d0139a7 callcatcher: update unused code
Change-Id: I2ddda0600ee876e9886ee3221f0ac5ad515fbd22
2014-09-17 09:55:42 +01:00
77fd06e18d Remove shadows in tabs to make them look more flat.
Change-Id: I7c125c10538a641ec723d95be987ad77cdebc9ba
2014-09-16 23:45:10 +02:00
f9c77344c6 Make tab label padding dependent on font height.
Change-Id: I7de52945bdf3062174b49e12e2f05075632c7e4a
2014-09-16 23:45:10 +02:00