Commit Graph

751 Commits

Author SHA1 Message Date
d4ca0cc293 loplugin: cstylecast
Change-Id: I0eaeebad6be75a1c0cccdf90955fde1a2909bdba
2014-10-23 12:36:14 +02:00
182fc4f184 fdo#84938: replace WINDOW_BORDER constants with enum
Change-Id: I91ca8e09971aee26f16257a4fd01125cfb2ebcdb
2014-10-21 09:06:40 +02:00
d634a61ebd vcl/layout.hxx was included twice
Change-Id: I03a30793e02def731cb6c8f130c48aeb325a2528
2014-10-18 11:19:27 +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
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
8044acf2db convert SFX_CALLMODE constants to SfxCallMode enum class
and fix a couple of bugs in SC and SW where the call mode was
being passed to the hints parameter by accident

Change-Id: Ief805410b3f7035e012e229e77f92d5832430f58
Reviewed-on: https://gerrit.libreoffice.org/11916
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-11 15:14:52 +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
22ca3bf1b9 coverity#1242370: Unchecked return value
Change-Id: I11d80ddea4a38ce69ad7076af6da0bf173bd8551
2014-10-04 15:08:13 -05: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
8559539c56 coverity#1242776 Unused value
Change-Id: Ia84bfbcdd4de08c9e87c877b3c1be84c0b712a07
2014-10-02 14:49:00 +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
b8ea41a98d cui: std::auto_ptr -> std::unique_ptr
Change-Id: Iea8b3def77842541129c16346270aa262654fea4
2014-09-30 10:33:26 +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
2b5cbaea83 fixed behavior of Writer's Special Character dialog
before: the character is inserted at the end
after: The character will be inserted where the cursor is or will replace the selected string.

Change-Id: If5f7cac24c98a9105c38864da5a4c6363a35a834
Reviewed-on: https://gerrit.libreoffice.org/11642
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-09-26 08:14:44 +00:00
16ea2665cd fdo#64302: Writer’s Special Character dialog could be simpler
Change-Id: Ia321a9df77a8741245378e5b995b3bc6922266e8
Reviewed-on: https://gerrit.libreoffice.org/11621
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2014-09-24 19:08:31 +00: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
102c2413c1 cui: sal_Bool -> bool
Change-Id: Ib472f25eb1625dadca8c2078b3f9cdab98763c8d
2014-09-12 15:47:44 +02:00
ea733ab5b6 Turn SfxItemState into a C++11 scoped enumeration
...to gain further confidence in the claim "that none of the existing
code tries to uses combinations of these enum values"
(d92602c5b13d0a60439d86c5a033d124178726ca "more fixes for SfxItemState")

Change-Id: I987922d945e8738e38adfde83b869adf3ff35b13
Reviewed-on: https://gerrit.libreoffice.org/11384
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2014-09-12 06:08:32 +00:00
39e91c585d Replace uses of old SFX_ITEM_AVAILABLE alias with SFX_ITEM_DEFAULT
Change-Id: I88eeac06413fc3935cbbdb357ff8bf9acaa383a8
2014-09-10 16:37:20 +02:00
d968c28287 fdo#45071: Remove ENABLE_NPAPI_INTO_BROWSER left-overs
...from previous commit

Change-Id: I945faa6215f971ce817c6450fe0786da0696091f
2014-09-09 15:20:35 +02:00
f6698fe54f src: capitalization as the rest
it's easier to grep

Change-Id: I3639467b77c8071f2ffe3204669514948ffff8a2
2014-09-05 04:06:33 +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
f4246fab77 fdo#56456 fdo#75578 fdo#63271 fdo#75805 Improve hyperlink dialog
Changes made:

* Rename "Back" to "Reset" like in other dialogs (eg. Writer - Format - Character).
* Apply-Button, which reflects the old behavior of the dialog, and doesn't
  close it automatically.
* Added an OK-Button, which applies the changes made and automatically closes the
  dialog.

With this both use cases should be handled:

* Inserting one single URI with simple close.
* Modifying multiple URIs without closing the dialog.

Hopefully all users are happy with this ;)

Change-Id: I1881dee083945cd165fbb8f8444395c1b04a0607
Reviewed-on: https://gerrit.libreoffice.org/10946
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-08-22 21:33:06 -05:00
ac57362b23 Typo: and->end
Change-Id: I8c3707dbf537261d7ed9a69807fc1bdeae851526
2014-08-21 07:33:38 +02:00
d21d5a7261 drop unnecessary shl.hxx includes
Change-Id: Ieb984987c4a4f888a563377e0500444b12f43506
2014-08-18 12:59:49 +01:00
a107bdfdfc ErrorBox->MessageDialog
Change-Id: I57d4e43460e40d3aff54873280eddbb18c12446b
2014-08-18 10:57:21 +01:00
dd97e42661 ErrorBoxes from fmsearch to String
Change-Id: I0c2d12a79e8af2125c3aad7f0a6cb873ce3b4d2c
2014-08-15 23:30:27 +02:00
2903650409 remove unused HYPERDLG_IMGBUTTON_HEIGHT
Change-Id: I24b9740f20ef975ab6ea747e7e35c721a99e91d0
2014-08-09 18:12:07 +02:00
59828ae2fc coverity#1229891 Uninitialized scalar field
Change-Id: I5e7e0f95b0a93c6b0db5b8ec313822fadbbc4a07
2014-08-07 18:00:43 +01:00
c9be1193b0 fdo#75757: remove inheritance to std::vector
Change-Id: Ia2f03e08199f23fd1b226db2c7e0bfade07bf0f0
Reviewed-on: https://gerrit.libreoffice.org/10719
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-08-04 11:06:25 +00:00
c0d298ecec Avoid possible memory leaks in case of exceptions
Change-Id: I9783669a26fd9c9e2c890f430b29427ccf6bea77
2014-07-30 14:31:07 +09:00
7dad065277 loplugin:unreffun
Change-Id: I5986efd3d5690cb63ea44afaba7705c6f747e7f8
2014-07-29 14:09:04 +02:00
e6caeefce4 Converted RID_SVX_MDLG_HANGULHANJA to Widget Layout.
Also, removed the unused hrc/src files.

Change-Id: Ice45dde1af7492e40e0847ead06bb26f4e58ed9c
Reviewed-on: https://gerrit.libreoffice.org/10595
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-07-29 11:59:06 +00:00
fe951dc06a coverity#1228876 Uninitialized pointer field
Change-Id: I8de9efc5abfa01225aa6032bf68a32fed17aeb00
2014-07-26 21:25:15 +01:00
77b74fe9de Avoid possible memory leaks in case of exceptions
Change-Id: I4c9d1746d43642e1be2dd1e72a1b689d3fae1ae6
2014-07-27 02:18:29 +09:00
20f6cf0377 Massive 'Dialogdiet fail' and similar to 'Dialog creation failed'
Change-Id: I6ca6914e80c186699df42253de46a3690c5130f2
2014-07-26 14:25:33 +02:00
e153510659 Convert RID_SVX_MDLG_HANGULHANJA_EDIT to Widget Layout.
Change-Id: I63d61a9caeb356e6b5bd340c1f9a5415869a91a1
Reviewed-on: https://gerrit.libreoffice.org/10518
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-07-25 09:19:09 +00:00
2529a364d1 coverity#1226482 Dereference after null check
Change-Id: I2723812f960cde23c480651c9f8f5b26585fd51d
2014-07-18 15:36:14 +01:00
de8648c3c8 Convert RID_CUI_DIALOG_COLORPICKER to .ui
Conflicts:
	extras/source/glade/libreoffice-catalog.xml.in

Change-Id: I161681859c924cc97afa9886b80005e70fa2a87c
Reviewed-on: https://gerrit.libreoffice.org/10210
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-07-11 14:39:28 +00:00
33be4c0f69 return early for empty bitmap
Change-Id: I768ffe9dc1226bbcca706e0c56c6103e043b2401
2014-07-11 15:38:22 +01:00
5a3d129a46 remove SvRefBase::ReleaseReference
because no-one is using the return value of ReleaseRef, but everyone is
calling ReleaseRef, so make ReleaseRef void-returning and remove
ReleaseReference

Change-Id: I0bedcb65a887ba7a4953132b4c1ccefbdd554a43
2014-07-10 12:03:16 +02:00
d92aa2f445 remove SFX_APP() macro that was a mer wrapper for SfxGetApp()
Change-Id: I480a789c767dd671775c9d70d96bf71908f21f5b
2014-06-27 17:08:04 +02:00
56bbd70990 -Werror,-Wunused-function -Werror,-Wunused-private-field
... -Werror,-Wunused-variable loplugin:bodynotinblock

Change-Id: I64742401e22b4b83364411a7454c755daa78d00c
2014-06-24 13:21:05 +02:00
46de7b7dbe tweak sizes
Change-Id: Ica7275696b3f7e59d0db5d27811905710dce32e1
2014-06-24 10:05:24 +01:00
1579fc7930 hide old page on showing new page
and showing/hiding pages during Paint seems crazy to me, doing it
during ShowPage makes sense.

Change-Id: Ifd0c3c50812157cfa793da86715d58818e944e6b
2014-06-24 10:05:24 +01:00
5b98dcd94f loop through all pages to get optimal size
Change-Id: Ie565ec33c8eaacb490eebcacec7662fde511e98a
2014-06-24 10:05:23 +01:00
35ec23fa29 rename and rework SetCtrlPos to SetCtrlStyle
Change-Id: I5720f5f27ea5e7e9eefb6bfb53c30a52146c689e
2014-06-24 10:05:23 +01:00
ea3fc1dd4a unnecessary check before delete
Change-Id: Ie5793f910dd58e8930c2c2b27df00bd073c26f35
2014-06-24 10:05:22 +01:00