Commit Graph

414 Commits

Author SHA1 Message Date
3b658759c9 clang-cl loplugin: embedserv
Change-Id: I9901dac882a74453015881ded2355ff0a51b50d5
Reviewed-on: https://gerrit.libreoffice.org/29868
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-16 14:19:18 +00:00
60e264c4fd 64-bit Windows fix: InsertMenu takes a UINT_PTR
Change-Id: Id14c9ac30d52fdeb6b9157df7f57202e94838909
Reviewed-on: https://gerrit.libreoffice.org/29817
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-14 12:48:31 +00:00
d4aae1b104 -Werror,-Wnonportable-include-path (clang-cl)
Change-Id: Ia468adf0bea2f7fca9b370ef0ff8b05e34b3ac19
2016-08-25 17:39:19 +02:00
c11e60f11f tdf#99643 OLE automation bridge: fix 64-bit pointer conversions
XBridgeSupplier2::createBridge() is always called in-process and should
therefore expect and create Anys with native-sized encoded pointers,
so use sal_uIntPtr.

Change-Id: Ia757ff38568b07de8085a1a9d323d806bcca0f63
Note: Currently all calls in LO code are with source=UNO, target=OLE.
2016-06-01 00:11:10 +02:00
a890e3189b SAL_FALLTRHOUGH in Windows-only code
Change-Id: If35da46c209746a86687e1c3f60f72f2f08aa681
2016-05-25 08:42:15 +02:00
58a32075ca use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
2016-05-04 12:39:40 +02:00
20f23c1a28 Fix typos
Change-Id: Ic4fbc8e7220eb4641f67ef4f85d4853608a369f4
Reviewed-on: https://gerrit.libreoffice.org/24257
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-04-21 20:36:29 +00:00
4c7ec9f112 cleanup: remove unused com/sun/star/uno includes
Sequence.h(xx), Any.h(xx) and Type.h(xx)
and remove unused using-declarations from these files.

Add a few missing includes provided by them.

Change-Id: I6b91b6d1fdf9d0496dd546c0aab9bdcc6831a5d4
Reviewed-on: https://gerrit.libreoffice.org/23805
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-12 06:38:26 +00:00
af662f323d -Werror,-Wshadow
In the second part, looks odd that those two lines are a perfect copy of what is
already done near the start of the function, but I have no insight at all into
that code, so just leave it at that.

Change-Id: I6b1d973f77a3d9389880ddec500968144ba615f2
2016-03-04 17:04:57 +01:00
5a7289dc14 Silence -Werror,-Wnon-virtual-dtor in external includes
Change-Id: I2ef42eca934588b219de52dfc7c373395118cc32
2016-03-04 10:11:13 +01:00
b1d9fe788e -Werror,-Wshadow
Change-Id: Ie6a35ce1fece5de31f455d88ab3e12010b8047f5
2016-03-04 10:11:09 +01:00
6fbac177dd -Werror,-Wunused-macros
According to
<https://msdn.microsoft.com/en-us/library/windows/desktop/aa383681%28v=vs.85%29.aspx>
("Enabling STRICT"), it is used in combination with including windows.h, so
maybe this #define STRICT (which was there ever since
a934115b3ea90d7883681a6ca8922a4b859be36f "Initial revision," w/o also including
windows.h) was always unnecessary (as reported by clang-cl).

Change-Id: I02cf2584fe2fd52e9513791b18fdf6e7982e89b3
2016-03-04 10:11:09 +01:00
e4f8d0c9c4 Silence -Werror,-Wnon-virtual-dtor
Change-Id: I46f7b68aded50abc0015b458507adbf84d0ffe76
2016-03-04 10:11:08 +01:00
b955d437ca -Werror,-Wshadow
Change-Id: I40f92daa60a08d93ea7bbe309fd16fa7ef27e78b
2016-03-04 10:11:08 +01:00
a238b1f8d3 Remove excess newlines
A ridiculously fast way of doing this is:

for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
  --exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
    perl -0777 -i -pe 's/^
{3,}/

/gm' $i
done

Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:18:05 +00:00
4b68b6d323 Silence -Werror,-Wmissing-field-initializers in END_OBJECT_MAP (clang-cl)
Change-Id: Ia9ba7fc6cd94e2d726cd9b1dc72c140af16dd700
2016-01-26 17:06:42 +01:00
432adca092 Silence more warnings, clang-cl's /W4 now also includes -Wextra
Change-Id: I20fa3b02570bdbc3ccd297401a7669b0fda5c624
2016-01-26 17:06:41 +01:00
f719e15c0e more Windows build fixes
after my OInterfaceContainer2 change

Change-Id: Ic365cf09631ff58c7d1b54795e7024923ebe02d1
2016-01-25 14:32:37 +02:00
21e35e2e3b more Windows build fixes
after my OInterfaceContainer2 change

Change-Id: Idc8d9aa218fbeea0e6b00216bb12b0e50efea57c
2016-01-25 14:10:47 +02:00
c4d5feb3fe more Windows build fixes
after my OInterfaceContainer2 change

Change-Id: I8dabb07088c03795d6ac1989ad5ef318d011ccff
2016-01-25 13:56:36 +02:00
df1055ebde more Windows build fixes
after my OInterfaceContainer2 change

Change-Id: I2d59fd166672a2d0b6c05e5bf9368c8fa5cf111c
2016-01-25 13:19:29 +02:00
45b8337f6a more Windows build fixes
after my OInterfaceContainer2 change

Change-Id: I869126a90e67bd00e953182ccafa6569009316ea
2016-01-25 13:05:01 +02:00
692a7c2e79 more Windows build fixes
Change-Id: I0b42df81c2848fb7d8a4722a984caaaa458da78f
2016-01-25 11:01:22 +02:00
752cd07d08 InterfaceContainer2 with vector instead of Sequence
create an InterfaceContainer2 class to replace InterfaceContainer.
It uses a std::vector instead of a Sequence for the mutable listener
list, which provides far better performance.

Switch all our internal use-sites to the new class.

Change-Id: I6b56cfa511ded2395faa22e68fab3b2f16c3cb88
2016-01-25 08:52:03 +02:00
c9be2744d8 cppcheck: noExplicitConstructor
Change-Id: Ifdcb1cc12645d6cdba81d16f94f0268696187cde
Reviewed-on: https://gerrit.libreoffice.org/21201
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-01-07 19:27:28 +00:00
3149c04bb7 Resolve Linker Warning LNK4104
See https://msdn.microsoft.com/en-us/library/e821azx1.aspx
Some export symbols should be PRIVATE

Also, don't export DLLMain. It is internal function
used by CRT, and not intended to be exported.

Change-Id: I48139b985aa2ee499c2005d8b0d966a2cc6dcd0c
Reviewed-on: https://gerrit.libreoffice.org/20419
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Matúš Kukan <matus@libreoffice.org>
2015-12-08 19:34:59 +00:00
803bff584c -Werror,-Wint-to-pointer-cast
Appart from the by-design type-punned use in CreateWindowEx, m_uID is (only)
used in a call to MAKEWPARAM (to create a WPARAM to pass into a SendMessage
call), so the most realistic type to use seems to be WORD.  And
CHatchWindow::Init is only called with a value of 2000 (from docholder.cxx),
anyway.

Change-Id: I4b6554d1ca9bb3926378c9e25a5473609f5951c5
2015-12-02 08:02:21 +01:00
c59646dce5 Silence clang-cl warnings in ATL headers
Change-Id: Id94279d0086bc29569783f4e0b5d975be162e823
2015-12-02 08:02:18 +01:00
31927f9703 -Werror,-Wunused-variable
Change-Id: I6800b97cfbf2e986c341d8893658f511951bc8f0
2015-11-28 13:59:59 +01:00
0ea6755161 -Werror,-Wunused-variable
Change-Id: If674f0a3199a43cec84eb8cfb3b3c1d334a288ca
2015-11-24 08:46:57 +01:00
fa257a38b0 Use Get/SetWindowLongPtr, for 64-bit build
Change-Id: I02e5ca8dad87c24f8bf6e192a6b37ffc82a5a04a
2015-11-24 08:46:56 +01:00
04277e7bcf -Werror,-Wbitwise-op-parentheses
Change-Id: I36bd91dc2bb77a09f59e865527db1e9c6724a652
2015-11-24 08:46:56 +01:00
0968238517 Expand single use of SendCommand macro
Change-Id: I8af259f55e8fc318ccdbc69bba00ae0d7d3aacdb
2015-11-24 08:46:55 +01:00
63915326cb -Werror,-Wreorder
Change-Id: I8350b7e60e54eb0f0be5fa33a4ca4de40551618c
2015-11-24 08:46:55 +01:00
e3eebcc45c -Werror,-Wlogical-op-parentheses
Change-Id: I39f59a88c34c37bad520dd44f3e8fcaf4a016eee
2015-11-24 08:46:55 +01:00
5508383014 -Werror,-Wreorder
Change-Id: I71e3d8878a8c7190ef239e4529d23eccaadc80d6
2015-11-24 08:46:54 +01:00
cf2f0f9c20 -Werror,-Wint-to-pointer-cast
Change-Id: I6db7d7595fda972e7c5d5c24d235678671478975
2015-11-24 08:46:54 +01:00
f08d0142af Fix css.awt.XSystemDependentMenuPeer.getMenuHandle
...to return an ANY containing a 64-bit HYPER instead of a 32-bit LONG for
SYSTEM_WIN32 (which covers both 32-bit and 64-bit versions of Windows), so that
the HMENU value (which is effectively a void*) is not truncated for the 64-bit
build.

This should effectively be URE ABI compatible for the 32-bit build, as there the
HYPER value will fit into 32 bits, so extracting a LONG from the ANY should
still work.

Change-Id: Ief3de5924f672e8f6bbe6df08c15439456ca036f
Reviewed-on: https://gerrit.libreoffice.org/20045
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2015-11-18 21:11:02 +00:00
753057b0d8 The #else branch is unused now
...after a3ce60eb3c8bb5c69ab41556398efa8316286477 "We only support MSVC 2008
(_MSC_VER 1500) or later" removed the

  && (_MSC_VER > 1310)

part from the #if

Change-Id: I472461b29a37fcf996262c0a83cb10f4cb8443a9
Reviewed-on: https://gerrit.libreoffice.org/20042
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2015-11-18 17:42:37 +00:00
8c0d5d494f -Werror,-Wlogical-op-parentheses
Change-Id: I8e22b6399bbdb07c376299d5a23c8061af18578d
2015-11-18 17:19:18 +01:00
94f790a4e6 -Werror,-Wduplicate-decl-specifier (extern "C" already in STDAPI)
Change-Id: I634debc05a24e0d519200fc91a77d50f36b9af38
2015-11-18 17:19:15 +01:00
4668528dda -Wmissing-braces is globally disabled in com_GCC_defs.mk anyway
Change-Id: Ie2a1e6785ac925f268e63775f2282df3f3c6bcd4
2015-11-18 16:53:14 +01:00
25aec383f9 use initialiser for Sequence<OUString>
replaced using:
git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)'
| xargs perl -0777 -pi -e
"s/Sequence<\s*OUString\s*> (\w+)\(\s*1\s*\);
.*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g"

Change-Id: I20ad0489da887a9712982531c3b127339bb8b3b9
Reviewed-on: https://gerrit.libreoffice.org/19969
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 12:18:55 +00:00
b5db48ada1 no need to use OUString constructor in call to createInstance
Change-Id: Iaf3d83ba1490cb1d97a5bd4d1f7cd6943d4a7296
Reviewed-on: https://gerrit.libreoffice.org/19704
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-01 15:25:43 +00:00
3c971162b5 use uno::Reference::set method instead of assignment
Change-Id: I150f213ab033f5fc1b50abe4e1529292206c9feb
Reviewed-on: https://gerrit.libreoffice.org/19689
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-31 12:56:38 +00:00
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
6a93b970c5 com::sun::star->css in embedserv/
Change-Id: Iaf1e30ae7dc9710a16a031ea623d531e9e65a6a5
Reviewed-on: https://gerrit.libreoffice.org/19025
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-01 08:01:49 +00:00
35fd0cf311 cppcheck: noExplicitConstructor
Change-Id: I39194062ba68c4cb1ccc9b93c629f005ccd02497
2015-09-13 22:42:35 +01:00
f0208db49d cppcheck: fix some redundantCondition warnings
Change-Id: If53d33fb4d9ca9dc1babb9043bd07c5d29fe74c2
Reviewed-on: https://gerrit.libreoffice.org/18353
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-09-05 13:42:02 +00:00
aecdaa7186 tdf#88206 replace cppu::WeakImplHelper* etc.
with the variadic variants in embedserv and eventattacher.

Change-Id: I556ad208a7ffcf85c484e298cdbb1324b8a6a659
Reviewed-on: https://gerrit.libreoffice.org/17499
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-05 07:00:14 +00:00