939 Commits

Author SHA1 Message Date
Stephan Bergmann
9ac98e6e34 Finally switch MSVC to sal_Unicode = char16_t, too
There is lots of (Windows-only) code that relied on sal_Unicode being the same
as wchar_t, and the best change may be different in each case (and doing the
changes may be somewhat error prone).  So for now add SAL_U/SAL_W scaffolding
functions to sal/types.h, remove their uses one by one again, and finally drop
those functions again.

Change-Id: I2cc791bd941d089901abb5f6fc2f05fbc49e65ea
Reviewed-on: https://gerrit.libreoffice.org/36077
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04 16:12:11 +00:00
Miklos Vajna
a5a571307f tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using

make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle"

Except some modules have their own foo::tools namespace, so there have
to use ::tools::Rectangle. This commit just moves the class from the
global namespace, it does not update pre/postwin.h yet.

Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2
Reviewed-on: https://gerrit.libreoffice.org/35923
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-31 06:27:11 +00:00
Andrea Gelmini
55cc79f33f Fix typos
Change-Id: Ic823a46019138b8bbcacd7b52b48d7d7ead2fde2
Reviewed-on: https://gerrit.libreoffice.org/35629
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25 09:27:18 +00:00
Julien Nabet
68722bd4ba Typo: BimapPainter->BitmapPainter
Change-Id: I2176e0050ca92de0f2effb7257dd7ebba2a4f439
Reviewed-on: https://gerrit.libreoffice.org/35411
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-18 18:22:32 +00:00
Andrea Gelmini
3063d55b8b Fix typos
Change-Id: I338dacd3cfe915714a9038e1dea4a60d586e9394
Reviewed-on: https://gerrit.libreoffice.org/34806
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03 07:05:43 +00:00
Tor Lillqvist
b57d51e32f Drop :: prefix from std in [de]*/
Change-Id: I3247894fe022dce7f0aa351bd85fefcd7c545dd4
Reviewed-on: https://gerrit.libreoffice.org/34377
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2017-02-17 18:41:19 +00:00
Stephan Bergmann
5ce42c2165 Some simplifications, using UNO_QUERY_THROW
Change-Id: Ieee649609a7f01b4d51ed6ed78a8ae809ca61d9e
Reviewed-on: https://gerrit.libreoffice.org/34268
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-15 14:18:47 +00:00
Stephan Bergmann
ea5fffddcf Remove misguided comment
...introduced with 7757a18cfd77996f4ce8aef2cbb8c70425ae92da "INTEGRATION: CWS
oj14", but for one !xDoc.is() is explicitly handled below, and for another
xLoadable is only used if !xDoc.is().  So the requirement is apparently that not
both are null, indeed.

Change-Id: I1b59e99c86c88c5266b33e9ff782054fa40dd34d
2017-02-13 22:13:42 +01:00
Stephan Bergmann
fed3783e77 Add missing #includes
...like 6dce9c6757823b9e89863716ae70ff4e8ddd4e60, for Windows-only code

Change-Id: I35f37aae2e6f55ff8ed82afc710a9b59a43b028c
2017-02-08 08:40:06 +01:00
Stephan Bergmann
6dce9c6757 Add missing #includes
...and remove some unncessary using directives/declarations, in preparation of
removing now-unnecessary #includes from cppumaker-generated files, post
e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception
specifications".

Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-06 17:21:16 +01:00
Stephan Bergmann
87087bab94 loplugin:stringconstant
Change-Id: I8b7611d6fdc55fc8cd9551e129a2e03e58682229
2017-02-01 16:00:41 +01:00
Noel Grandin
1c3e84d819 teach lolugin:stringconstant about calling constructors
so we can remove unnecessary calls to the OUString(literal) constructor
when calling constructors like this:
   Foo(OUString("xxx"), 1)

Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36
Reviewed-on: https://gerrit.libreoffice.org/33698
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-31 08:56:20 +00:00
Stephan Bergmann
e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
Caolán McNamara
da55a0e515 Ole10Native payload truncated
Change-Id: If2c0c2788e54eb01a1b6998c81df016061a0ad6b
2017-01-23 10:52:23 +00:00
Noel Grandin
2bbf21aade use rtl::Reference in DocumentHolder
instead of manual acquire/release

Change-Id: Id795dca5ff9e392fa2649f4721a73ce3ffd6de2c
2017-01-23 07:56:34 +02:00
Noel Grandin
4f5b22b93a use rtl::Reference in OCommonEmbeddedObject
instead of manual acquire/release

Change-Id: Ie641f72687a05e1cd3cf697d551f9c6d21ac4487
2017-01-23 07:56:34 +02:00
Stephan Bergmann
8ec11cea96 loplugin:dynexcspec (clang-cl), embeddedobj
Change-Id: Iccb2a91319f8cbc300f0e428b06b0580432089a6
2017-01-20 11:53:29 +01:00
Stephan Bergmann
9cc666630d New loplugin:dynexcspec: Add @throws documentation, embeddedobj
Change-Id: Icf9a507a2b1eec0ace22e727bdf7220bfe7096b8
2017-01-19 18:03:21 +01:00
Noel Grandin
5e58ea581e fix windows build
Change-Id: I69da07e0e12d9bd03534b60a2ecd9a6c0cc61239
2017-01-19 14:28:48 +02:00
Noel Grandin
37192ccc89 use rtl::Reference in OleEmbeddedObject
instead of raw pointer and manual acquire/release

Change-Id: If626f34f3e0d7689567e2d64f94a84e5c8aae28f
2017-01-19 13:06:47 +02:00
Noel Grandin
53f21cde33 new loplugin: useuniqueptr: embeddedobj
Change-Id: I4c1302061a3607540af7de7a45ba060d3c0b403b
Reviewed-on: https://gerrit.libreoffice.org/33153
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-16 13:27:25 +00:00
Caolán McNamara
7536791802 in extremis dump Ole10Native payload and launch system viewer on it
so embedded plain text documents/source code/etc in word documents can be viewed
by us under Linux

Change-Id: I19e19619070841fe097c70297adc2e8b96d1c581
2017-01-12 11:18:51 +00:00
Stephan Bergmann
691bc3e15d loplugin:externvar (clang-cl)
Change-Id: I034eeb9525bbb8fdc39e176a2433f1b3dfff566a
2017-01-11 13:42:40 +01:00
Julien Nabet
5f757b7b37 Typo: GetReccomendedExtent->GetRecommendedExtent
Change-Id: Ic04a9ff115827558f9bc528c100b53bd7ca23486
Reviewed-on: https://gerrit.libreoffice.org/32587
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-01-01 20:18:54 +00:00
Stephan Bergmann
0fef19f121 loplugin:unnecessaryoverride (dtors) in embeddedobj
Change-Id: I5a65a8816438b7e777cabeb334a8cd7bcf4c814e
2016-12-05 09:04:45 +01:00
Jochen Nitschke
930f0242a1 replace <<= with assign for <<= with rhs Any
queryAggregation and queryInterface return Any

Change-Id: Ib8e3e742bd66f7419cad583988b247bb628f7b4a
Reviewed-on: https://gerrit.libreoffice.org/29912
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-19 05:28:29 +00:00
Stephan Bergmann
5eab3e5eec clang-cl loplugin: embeddedobj
Change-Id: Id8359ff2bc2ae177837f5c58f949d40b818a8684
Reviewed-on: https://gerrit.libreoffice.org/29869
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-16 14:19:19 +00:00
Stephan Bergmann
106ea87205 Remove _TYPED suffix from tools/link.hxx macros
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually
typed Link" to distinguish the new, typed versions from the old, untyped ones,
but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173
"remove untyped Link<>" removed the old versions.

Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-05 07:56:12 +02:00
Stephan Bergmann
91af7e0ee6 SAL_WARN in case bBackToLoaded failed
Change-Id: I3ee3801ae36b7394a97f46e76116cfd11c74de2d
2016-09-27 11:48:58 +02:00
Caolán McNamara
e6fc195ae8 Resolves: tdf#98946 too many running MathTypes...
causes mathtype to display a warning dialog, so
try restoring them back to loaded after loading
them in order to get their preferred size

Change-Id: Idff714efa228a739f380dbae429d852a8f8c5298
Reviewed-on: https://gerrit.libreoffice.org/29234
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-09-27 09:14:57 +00:00
Caolán McNamara
373b44a2fc Resolves: tdf#101971 OleLoad under structured exception guards
sample pptx crashes down in the depths of (apparently pre-installed on
32bit Windows 10) Flash.ocx

Change-Id: I4e083d492e56e72df47b2c172d7f07f0e39b82ea
Reviewed-on: https://gerrit.libreoffice.org/29199
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-09-23 07:37:32 +00:00
Michael Stahl
9035f00ede embeddedobj: add a comment why the original size is restored
... in OCommonEmbeddedObject::getPreferredVisualRepresentation()

Change-Id: I326b7df4350f34fc9a1c363ea0e9bc77d8f1e976
2016-09-16 14:36:38 +02:00
Noel Grandin
a2b77b4368 loplugin:singlevalfields in basic..idl
Also fix obvious bug in the initialisation of the
connectivity::odbc::OConnection::m_bClosed field.
Probably closes some kind of connection leak there.

Change-Id: I04579cf91bcd6d6c51c697d83971da4142743a82
Reviewed-on: https://gerrit.libreoffice.org/28932
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-16 08:30:26 +00:00
Caolán McNamara
74844277cc disable generation of ole previews in ODF format until after load
so the user update links dialog can control their generation

SdrEmbedObjectLink becomes exposed to calc so it can
detect if the link dialog needs to be used to update
ole links.

Change-Id: Id1dd7ea17342140eab9307d546528747e3a98090
Reviewed-on: https://gerrit.libreoffice.org/28879
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-09-15 11:55:28 +00:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.

(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to

  OOO_DLLPUBLIC_CHARTTOOLS    virtual ~CloseableLifeTimeManager();

in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro.  Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)

Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13 13:19:22 +02:00
Stephan Bergmann
5d268dcbaf loplugin:stringconstant: adapt to improved OUStringLiteral1 (embeddedobj)
Change-Id: I4d1d29155c09b15514f96a8b53f9865eefc78704
2016-08-30 15:27:57 +02:00
Takeshi Abe
989e8bc0d7 loplugin:salbool
Change-Id: Ib758a0b1c33173097aee80bff49b7c4937cf9fdf
2016-08-16 10:27:46 +09:00
Caolán McNamara
c5977a89c2 Resolves: tdf#96451 do magic to enable embedded chart sidebar only for chart
objects, and do the normal thing for other objects, e.g. math

Change-Id: Ifb786a841b843b0317713769cb214a44dceaf546
2016-08-15 21:25:00 +01:00
Takeshi Abe
b4e3c29f8a Fix typo: completelly -> completely
Change-Id: I566c5554bf32ea18121c5a186365b97c91667c5d
2016-07-29 10:07:33 +09:00
Noel Grandin
508c95f1b6 improve passstuffbyref return analysis
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c
Reviewed-on: https://gerrit.libreoffice.org/27317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-27 06:48:25 +00:00
Markus Mohrhard
54f83fee84 tdf#56818, use SolarMutex instead of own Mutex
There is a SolarMutexReleaser in the call chain so that using an own
mutex can deadlock.

Change-Id: I1dd0b0c78ce6cf436a470319e616099cb947b6e0
Reviewed-on: https://gerrit.libreoffice.org/27085
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-07-11 05:28:46 +00:00
Caolán McNamara
38971bd654 Resolves: tdf#100140 crash on exit of report design
This was triggered by

This appears to be triggered by 08cf2fd01064306eef7fdbb5b62320947c4d1089

commit 08cf2fd01064306eef7fdbb5b62320947c4d1089
Author: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Date:   Fri May 20 16:48:00 2016 +0200

which changed the order that things registered through
registerDispatchProviderInterceptor are used by, so swap the order of
registerDispatchProviderInterceptor calls here to sync with that

Change-Id: I047e4c7f6cb488c646df717e22c8ac91864c3938
2016-06-15 17:30:29 +01:00
Guillaume Smaha
2986e54412 Fix tdf#99506: Insert OLE object with icon failed
Change-Id: I7fe5814b268e4c70977699edaa89926ca3fda92e
Reviewed-on: https://gerrit.libreoffice.org/25080
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-05-24 07:03:45 +00:00
Stephan Bergmann
d567f8e242 Add SAL_FALLTHROUGH, where apparently appropriate
Change-Id: I49c216ed6e1e401fcc2029c047d7a7feeb767b36
2016-05-10 17:07:28 +02:00
Stephan Bergmann
14cd5182c5 Replace fallthrough comments with new SAL_FALLTHROUGH macro
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in
preparation of enabling -Wimplicit-fallthrough.  (This is only relevant for
C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.)

Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but
that would require adding back in dependencies on boost_headers to many
libraries where we carefully removed any remaining Boost dependencies only
recently.  (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its
future evolution will not have any impact on the stable URE interface.)  C++17
will have a proper [[fallthroug]], eventually removing the need for a macro
altogether.

Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-05-10 16:42:16 +02:00
Andrea Gelmini
fc2590cfa1 Fix typos
Change-Id: Id81b16ff26283611f0b84929d831c827f847ab73
Reviewed-on: https://gerrit.libreoffice.org/24317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-04-30 15:06:45 +00:00
Stephan Bergmann
bc9047540a loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I8542bfaf9e27792369617c44258ddcc393e490a2
2016-04-20 17:25:40 +02:00
Noel Grandin
62633dfe02 clang-tidy performance-unnecessary-value-param in various
Change-Id: I7168d44dab8e6a8e37bb7920d744ff32f5e52907
Reviewed-on: https://gerrit.libreoffice.org/24019
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-14 11:37:19 +00:00
Noel Grandin
b8eb294651 loplugin:passstuffbyref in various
Change-Id: I80070c83204e531c2f599f8a56193d6ffe0e5022
2016-04-14 10:24:47 +02:00
Jochen Nitschke
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