Commit Graph

252 Commits

Author SHA1 Message Date
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
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
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
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
ed75aa2719 create clang plugin to warn about C-style casts
We don't like C-style casts in our nice C++ code

Change-Id: I94e7ec90de9275cd6e20c4146d4f3a74bed93c9d
Reviewed-on: https://gerrit.libreoffice.org/10367
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-09-07 02:42:30 -05:00
0a8bf4b534 FloatingWindows are no longer loaded from resource files
Change-Id: I2705bbb4db52779e0065400f09604384fd9cf151
2014-09-06 07:02:42 +01:00
4cf5acef7d CancelButtons no longer loaded from resource files
Change-Id: If95ae86708660007e6a0f4df27b3c364a9653dae
2014-08-27 10:18:32 +01:00
54806224e3 OKButtons no longer loaded from resource files
Change-Id: Ice1d71e730519697c891d66909550876c9d23ebb
2014-08-27 10:18:32 +01:00
6802dc06de Dialogs no longer loaded from resource files
Change-Id: I55295009f474dbac15be792049fa5c6c95c1ec07
2014-08-26 17:00:21 +01:00
ca68971f0a ModalDialogs no longer loaded from resource files
Change-Id: I2d208c7cc5ff9bf26bff5ab2aa40e0bf57373342
2014-08-26 17:00:21 +01:00
07244947b5 MessBox not loaded from resource files anymore
Change-Id: I12378a1c80e1070763cd2bd0539d74f4cc270a30
2014-08-25 16:45:32 +01:00
bddd6d823d WarningBox are no longer loaded from resource files
Change-Id: Ib05a9876c0b1d3425dd1629f8a0fe3d16a57cc30
2014-08-25 16:45:31 +01:00
fd345ccfaf queryboxes cannot be loaded from resource files anymore
Change-Id: I2ee03b2f8f34d9ecf8a762e7845410fd9a31590f
2014-08-25 16:45:28 +01: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
50fffcaa05 Infoboxen are no longer loaded from resource files
Change-Id: If387291e9e145ee36338b1e560f18889c3b62674
2014-08-20 20:22:24 +01:00
d4a615bf62 ErrorBoxen are no longer loaded from resource files
Change-Id: I099258e449d0155154d60a839f9495236cb48cbb
2014-08-20 20:22:24 +01:00
afa5d63e2a TabPages are no longer loaded from resource files
Change-Id: I009e0f388cfe1861cef89d2148a02380dd47c1ff
2014-08-20 16:35:09 +01:00
e97997f1e5 SvMemoryStream.remainingSize ret. size to end of data not buffer
SvMemoryStream remainingSize returned the size from current
position to internal buffer size instead to end of data. This
was not consistent with what remainingSize description says on
SvStream (and other SvStream implementations work) and what the
user expects.

Change-Id: I7ff391754a386c5f067a4bd4eed2ee7f2d7fd77e
2014-08-16 20:49:19 +02:00
1c13f9c2b6 RSC_TRISTATEBOX is no longer used
Change-Id: Ib3f43db131cf5562ad011538873c2ee51839665c
2014-08-16 18:36:24 +01:00
b0da096c61 RSC_MULTILINEEDIT no longer used
Change-Id: If56233b5226cec9516d5e2f8992e1b0beae733bf
2014-08-16 18:33:04 +01:00
e09e956a0c RSC_TABCONTROLITEM* no longer used
Change-Id: Ic496662d623c4732db41476109b3731cf1fd71a0
2014-08-16 18:31:05 +01:00
07048650e2 RSCMENUBUTTON_MENU is not longer used
Change-Id: I2e12d923a07385fc6a036863070a10666542d39d
2014-08-16 18:31:04 +01:00
924dda90a9 RSC_MENUBUTTON is not in use anymore
Change-Id: I853b6b1cfcd4847603d9920a47298d1b9105b46f
2014-08-16 18:31:04 +01:00
748ed65ffb drop TabControl resource loader
Change-Id: Idb909c205dfadaadeb8b98ce08fe2f4286cfce26
2014-08-15 17:02:59 +01:00
933bcfd2fe various ids not loaded from .res anymore
Change-Id: Id2fab3e4b7a8feed3107e66d02cdf2a278ae9ef7
2014-08-11 10:22:12 +01:00
666f8651b1 simplify "no delete" logic in SvRefBase
by converting the bit munging to use bitfields.
Remove unused return values.
Add asserts to check that AddRef() is not called after the object
is deleted.
Fix the code in SfxObjectShell to not call AddRef() after
SfxObjectShell is deleted.

Change-Id: I3a3565a0bc45fc9d1d086222265ab8b8175818a7
2014-07-29 17:56:51 +02:00
2295697df9 convert the weak reference macro in tools into a template
which required making SfxFrame subclass SvCompatWeakBase,
but that makes the relationships clearer anyhow.

Change-Id: I209d05359d50111eacac72c971bb46ccf569ba49
Reviewed-on: https://gerrit.libreoffice.org/10285
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-07-25 08:13:39 +00:00
3f8a921471 remove dead code
Change-Id: I0d3d1a14d8eb880a5a054fe2e736f8ac97f8b727
Reviewed-on: https://gerrit.libreoffice.org/10284
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-07-22 14:19:37 +00:00
c1dd91a93c callcatcher: update unused code
Change-Id: I1dd1b40d807c7c9d9b145aca9f69a67d786ec5ff
2014-07-22 09:54:38 +01:00
490d302817 rename the Weak stuff in tools/ref.hxx to WeakRef
.. which more accurately reflects it's purpose

Change-Id: Ibb87a47a3d1f3e35ac2820f14c71adf3b227c961
Reviewed-on: https://gerrit.libreoffice.org/10283
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-07-17 11:56:14 +00:00
9bb70e1807 Revert "remove unused SvRefBase constructor"
This reverts commit 09a90c2ff5d39c3ae61b4041c3b39d3da0c640c1.

Apparently causes a crash in CppunitTest_sc_macros_test; it is
suspicious that the copy ctor is not made private in this commit, since
the compiler generated one would do something different.

Change-Id: Icb1121332d83e9f08d89535e3da6e10d690ac88a
2014-07-15 16:32:31 +02:00
48528e0062 add some comments to include/tools/ref.hxx
Change-Id: Ic38d7f5f816f2a91bfb468c0b7fb241b084a0c44
2014-07-14 13:31:59 +02:00
4ed943a24b inline SvCompatWeakHdlRef typedef
.. only used in 2 places in the same file

Change-Id: I5dc1dc77c3841bf86134f6a48597f8c1e71b2b3f
2014-07-14 13:31:22 +02:00
6d2178b8c8 inline tools::SvRefBaseRef typedef
..it is only used in two places

Change-Id: If333936b26592ed44d3525f2eb3c21aafde7dddc
2014-07-14 13:30:55 +02:00
09a90c2ff5 remove unused SvRefBase constructor
Change-Id: I81991231a2cc0b0c9d8289db8435ef8286f1c2bb
2014-07-14 13:27:30 +02:00
c6c5789ae8 include/tools/ref.hxx - cleanup formatting
Change-Id: I1f7f566ea80723b188aab9c2f65437ca902ce9b9
2014-07-14 08:51:46 +02:00
c05cecbe76 fix spelling in comment
Change-Id: Id0b3792b037b2e1a9357c7f26f554cc4222fed0b
2014-07-14 08:50:03 +02: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
a2b44216f1 fdo#66507 - accelerate common datum date conversion to days.
Saves ~40bn cycles, 10% of calculation for the bug document.

Change-Id: I9d48706ad2cfe290965b648306d95b4d66e5fc63
2014-07-08 14:33:42 +01:00
771075301a Include <algorithm> for std::min() and max()
Change-Id: I339577c5b34de0cf3e5dcc644ec1dc080c35d01c
2014-07-08 02:37:33 +03:00
6b322d0f9d Generally better to have DLLPUBLIC class with some DLLPRIVATE members
...in the same vein as 80a1a2599e04142683d2286d0e32d0e13fb45de3.

Change-Id: I5ffb27f0bc965aede03e6d1e849cd68ef6e16e2a
2014-07-03 17:52:42 +02:00
045598331a callcatcher: rsc loaded fixedbitmap is no more
Change-Id: Ie111d9ed3534eb8892400d638eac4b38b3904646
2014-07-02 09:46:31 +01:00
6bb92c5eaf Make sure IMPL_STATIC_LINK's type matches Link::pFunc's type
...to avoid -fsanitize=function warnings in Link::Call.

Change-Id: I837b35bd3052716fbb41bf4f893961257d1f9b2c
2014-06-30 18:30:40 +02:00
9ede5cd987 Remove unused INetURLObject::PART_* values
Change-Id: Icebdf0cad5306ae42a30de0b4f997e3b611675eb
2014-06-23 11:52:14 +02:00
160ae9889e Catch illegal null pointer dereferences early
Change-Id: I4d558e9a6e2c4e4d9feb45eb5a3fd01ee322bef8
2014-06-19 09:28:47 +02:00
8d373129e9 callcatcher: update unused code
and strip away some stuff in rsc that should now be dead

Change-Id: I6411e706c50dff299099680f1f942bf61c4e79f2
2014-06-15 20:30:39 +01:00