Commit Graph
1842 Commits
Author SHA1 Message Date
Noel Grandin 7960ccb41d loplugin:constantparam in canvas..comphelper
Change-Id: Ia666cb46c409852a13789389c032f0ce4377c0d5
Reviewed-on: https://gerrit.libreoffice.org/50927
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-08 10:34:50 +01:00
Julien Nabet cbc58ebf14 Use for-range loops in desktop (part1)
+ remove some useless typedef
+ some reindent

Change-Id: Ic1e445a7096b1663ca8cbc58c40bb8f7af0c70e1
Reviewed-on: https://gerrit.libreoffice.org/50787
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-05 23:58:20 +01:00
Mike Kaganski 7dc93bbf8a Don't do unnecessary check for trailing slash
The check is done in utl::TempFile::SetTempNameBaseDirectory

Change-Id: I62b40a4f53f68da14aae6fcdfbf4c2dc7515a2c5
Reviewed-on: https://gerrit.libreoffice.org/50501
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-02-28 22:54:56 +01:00
Stephan Bergmann e061f90a77 Clean up Desktop::CreateTemporaryDirectory
...avoiding the confusing, and apparently unnecessary back-and-forth between
system path and file URL.  (Superseding
<https://gerrit.libreoffice.org/#/c/50422/> "Don't overwrite system temppath
with old one that failed already".)

Change-Id: I247982a40d54565f5c98bda9a36209cba83c5c9f
Reviewed-on: https://gerrit.libreoffice.org/50494
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-02-28 15:08:06 +01:00
Caolán McNamara 6a4c464b49 weld native message dialogs
just the straight-forward MessageDialog cases first

a) remove border_width from message dialog .ui so as to take
the default border width
b) retain 12 as default message dialog border for vcl widget case
c) remove layour_style from message dialog button boxes so as to
take the default mode (a no-op for vcl widget case)
d) use gtk response ids (vcl builder will converts to vcl ones)

Change-Id: I7de281093a1b64f92f71ca11e7cbba42bb658154
Reviewed-on: https://gerrit.libreoffice.org/50143
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-22 22:07:38 +01:00
Markus Mohrhard 4f97bfb3c2 fix updater on windows
Change-Id: Ib6f2334a3f6f3f5c217a71e2967a69e354b0a473
Reviewed-on: https://gerrit.libreoffice.org/49956
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-02-19 00:44:39 +01:00
Caolán McNamara 6a3f9de585 native dialog initial basis
Change-Id: I392be563e38257390f748c70bb71c67a66778ddd
Reviewed-on: https://gerrit.libreoffice.org/49677
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-16 00:35:34 +01:00
Miklos Vajna 4322b69dfc desktop: allow disabling recovery via config key
The documentation suggests this should disable recovery, so read the
config value at the same place where we disable recovery due to the
environment variable.

Change-Id: I342ae58201aa1d731a5913c2f0598ddff2a8d602
Reviewed-on: https://gerrit.libreoffice.org/49706
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-14 20:48:23 +01:00
Mike Kaganski be13e756d6 desktop: MSVC: pragma warning: make more specific, remove obsolete
Change-Id: I61ed9700c904b7499166d32e4ffda69811d64a8b
Reviewed-on: https://gerrit.libreoffice.org/48973
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-02-01 06:52:53 +01:00
Mike Kaganski 903627c069 Function already take const OUString&
Change-Id: I87af48158b4afaf81da8545f9bccf459f11031d6
Reviewed-on: https://gerrit.libreoffice.org/48823
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-29 14:43:58 +01:00
Mike Kaganski 6fc9d4a482 Remove redundant variable
Change-Id: I062ea13827d7d9744b0965b305877633485015fa
Reviewed-on: https://gerrit.libreoffice.org/48405
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins <ci@libreoffice.org>
2018-01-24 05:44:05 +01:00
Michael Stahl 61c88ae694 gbuild: always compile as C++17 with MSVC 2017
The current update MSVC 2017.5 supports fancy new C++ features, but
unfortunately in its default C++14 mode it falls over and dies with
an internal compiler error as soon as it sees the WeakImplHelper
variadic template.

In order to work around the ICE, build everything as C++17,
which somehow doesn't crash.

This causes loads of deprecation warnings about obsolete std::this
and badly designed std::that, almost all of them from boost headers,
which are well known for following every best practice in the C++ book.

Liberally sprinkle macros around to suppress the warnings for now,
like we already do with the other million warnings from boost headers.

Change-Id: Ia6b6ef5e457b5fe3c8cfe361ba5da39376bb7c4c
Reviewed-on: https://gerrit.libreoffice.org/48225
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-22 20:08:05 +01:00
Mike Kaganski cf333a878c tdf#38915: set cProcessed condition on any process outcome
When application is initializing, initially request handler is not
processing requests (its state is Starting). Requests processing is
enabled in Desktop::OpenClients() after recovery had been processed.

If another soffice process is started, it communicates over already
established pipe, and sends a request to the first process. In
IpcThread::process(), it is decided if the request needs to be checked
for completion (e.g., if a file or specific module was requested to be
open). After that, the prepared request is posted for processing. In
case when the completion should be checked, PipeIpcThread::execute()
then waits for Processed condition indefinitely.

Request is processed in RequestHandler::ExecuteCmdLineRequests, which
first checks that handler's state is RequestsEnabled, and if it isn't,
then returns. Otherwise, after processing, Processed condition is set.

The problem is, thus, in case when the request comes before requests
processing is enabled (e.g., when recovery dialog is open): request
handler thread waits indefinitely, but the processed condition will
not be set. This will not allow to close the pipe to second process,
and it will hang indefinitely. The IPC thread will be hung even after
user closes recovery dialog, and continues working with program. So,
subsequent attempts to open files from file manager (launching new
process) will fail, and new zombie soffice processes will wait the
first indefinitely. Also, when first process will be closed by user,
the deinit sequence will attempt to wait for the IPC thread to finish
(in RequestHandler::Disable(), after all visible windows had been
closed), which will leave the first process hung, preventing all
subsequent attempts to open LibreOffice.

This patch ensures that the Processed condition is set at any outcome
in RequestHandler::ExecuteCmdLineRequests. Also, it brings (possibly
hidden) recovery dialog to front, making the reason why following
attempts to open files fail apparent to user.

Change-Id: Ibddf7483e5b1d6167ac7f307ea2442119f446129
Reviewed-on: https://gerrit.libreoffice.org/48280
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Aron Budea <aron.budea@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-22 07:46:48 +01:00
jan Iversen feb601b751 iOS, allow unorc to be read
One reason why init did not work, was that it did a throw due
to a wrong path on unorc

Change-Id: I928f25358befe05f8986e9ebcffda27e8beb397c
2018-01-20 18:54:29 +01:00
Andrea Gelmini 624f84c07e Fix typos
Change-Id: I078626eaa3155cc429320cc8c1532003b382b22a
Reviewed-on: https://gerrit.libreoffice.org/47855
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-16 12:40:51 +01:00
Stephan Bergmann 029149e9b7 More loplugin:cstylecast: desktop
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files

Change-Id: I492363d79e443221b139f0c192a552cc5548ee4f
2018-01-12 20:25:38 +01:00
Noel Grandin 17ee20b161 loplugin:passstuffbyref improved return in emfio,writerfilter
Change-Id: I237936d62d0f1b17574dd88b5c9de932dc03238e
Reviewed-on: https://gerrit.libreoffice.org/47214
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-31 16:03:43 +01:00
Caolán McNamara 1c7d339002 request installation of langpack via packagekit
if ui is set to track the locale automatically and the current locale
has no match in installed resources but has a match in the list of
languages that libreoffice was compiled to contain

so e.g. de_AT locale shouldn't trigger the installation of anything if
langpack-de is already installed and yue_HK shouldn't trigger install
of anything cause that not supported (at time of writing) for libreoffice

put Fedora/RHEL/Ubuntu naming schemes in here.

I moved the lang code from svl to svtools so I could use the restart dialog
to prompt to restart after the langpack is installed, but packagekit's blocking
mode seems to be no longer blocking and control returns immediately which is a
change since the last time I played with this stuff, so drop the restart thing
for now. The lack of a blocking modal also makes the "run this on idle when there's
a toplevel window up and running" a bit futile, but lets keep that for now anyway.

caolanm->rene: I know you'd disable this anyway, so Debian is left out, there's
also config key Office/Common/PackageKit/EnableLangpackInstallation to disable
this too.

Change-Id: Ice731be539850338ccdd8af87839e0b4d83f01e7
Reviewed-on: https://gerrit.libreoffice.org/46856
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-22 20:08:51 +01:00
Noel Grandin 3af500580b loplugin:salcall fix functions
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.

Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11 12:13:46 +01:00
Stephan Bergmann 19f9a7e298 Remove unused #include <vcl/metaact.hxx> from vcl/outdev.hxx
...and fix the fallout

Change-Id: Ie514bd95d5a9f990a887566619031e9844c40b92
Reviewed-on: https://gerrit.libreoffice.org/45195
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-06 20:25:51 +01:00
Timotej Lazar 6a97d9c4d9 tdf#112689 Replace chained O(U)StringBuffer::append with operator+
Change-Id: Iea9a6e2104966bd47f09a82df9b01f065f678d17
Reviewed-on: https://gerrit.libreoffice.org/45079
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-23 13:39:38 +01:00
Stephan Bergmann 1d80281259 Various loplugin warnings in --enable-online-update=mar
Change-Id: I5dabd5b65420d30b8d5b631de4d755ecf385b762
Reviewed-on: https://gerrit.libreoffice.org/45027
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-21 19:46:48 +01:00
David Tardon 95e3e5b83b fix fallout from orcus upgrage
Change-Id: I79a9988c24d04b9c6a9369653a60b2324465b1d8
2017-11-21 10:26:43 +01:00
Andrea Gelmini d71bcc4dc5 Fix typos
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91
Reviewed-on: https://gerrit.libreoffice.org/44654
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-11-13 08:43:17 +01:00
Stephan Bergmann 5598e4bd2f Finally make DbusIpcThread terminate
...by directly calling shutdown(3) on the underlying socket, to make
dbus_connection_read_write fall out of its internal poll(3) call blocked on
POLLIN (upon which it returns false).  (dbus_connection_close only calls
close(3), so calling it from DbusIpcThread::close would merely decrement the
socket file descriptor's reference count.)  This removes the need for the sent-
to-self "Close" command (whose processing turned out to be too brittle in
parallel with closing the connection down, witness my previous three fruitless
commits in this area).

There appears to be no need to explicitly call dbus_bus_release_name, as the
session bus apparently takes care of releasing the name as soon as the
associated connection is closed.

Also there should be no need to call dbus_connection_read_write_dispatch instead
of just dbus_connection_read_write, and dbus_message_pop_message should probably
be called in a loop, until all queued messages are processed.

Change-Id: I13f30b6676a531f349e953329e910c1ff45ee53e
2017-11-06 09:18:50 +01:00
Stephan Bergmann fa6d8eebd1 loplugin:includeform: desktop (Windows)
Change-Id: I245c58a3d97eb0d60e7063e9c34c77d33739801d
2017-10-27 19:28:52 +02:00
Stephan Bergmann dc38de4fc1 ...and one more fix for DbusIpcThread,
switching back to a "Close" message-to-self without a response (as it had been
before dc3ff192f3 "Avoid further unwanted
interference of DbusIpcThread::execute/close").  Especially on a first start of
LO (where it restarts after creating the UserInstallation), it had been observed
that DbusIpcThread::close was blocked waiting on a reply in
dbus_connection_send_with_reply_and_block while DbusIpcThread::enable had
already successfully (i.e., without emitting any of the SAL_WARNs) proceeded
past sending the reply and was blocked on closeDone_.wait().  However that can
happen---it should be clear by now that I don't understand anything at all about
DBus.  :(

Change-Id: Id5f368a60b2d8dd8b7074308ac1ad6b6545131ff
2017-10-27 12:44:40 +02:00
Stephan Bergmann dc3ff192f3 Avoid further unwanted interference of DbusIpcThread::execute/close
...after 38081c0884 "Avoid race between
DbusIpcThread::close and DbusIpcThread::execute"

Change-Id: I812f53525f4c2c051781321dac7096e3bf0d7054
2017-10-25 17:09:17 +02:00
Stephan Bergmann 38081c0884 Avoid race between DbusIpcThread::close and DbusIpcThread::execute
...that caused Flatpak'ed LO to sometimes not terminate properly after
243d743dae "solenv/flatpak-manifest.in:
incorporate upstream sandboxing improvements" had removed --socket=session-bus
and thus introduced flatpak-dbus-proxy into the mix:

> Oct 24 15:25:16 <sberg_> I'm not sure who's at fault there; on the LO side I
>  have a thread processing incoming dbus requests (DbusIpcThread::execute,
>  <https://opengrok.libreoffice.org/xref/core/desktop/source/app/officeipcthread.cxx#552>);
>  that thread is typically waiting within dbus_connection_read_write_dispatch
>  for new messages; if LO wants to close, it needs to get that thread out of
>  dbus_connection_read_write_dispatch, and the only way I found back then is
>  what's in DbusIpcThread::close (just following DbusIpcThread::execute), with
>  a big "this apparently needs a more DBus-y design anyway" testament to my
>  cluelesness re dbus; it calls dbus_bus_get_private to connect to itself, and
>  send a Close message that'll cause DbusIpcThread::execute to fall out of the
>  loop; the dbus_bus_get_private leads to a flatpak_proxy_incoming in the
>  proxy, which returns TRUE, and after that I see no further activity in the
>  proxy (but not sure what functions I should all put breakpoints on), and the
>  LO side is hung in dbus_bus_release_name a few lines futher down
> Oct 24 15:26:20 <alexlarsson> sberg_: i ran this:
>  https://github.com/sgh/dbus-examples/blob/master/dbus-signal.c
> Oct 24 15:26:27 <alexlarsson> sberg_: which calls dbus_bus_release_name
> Oct 24 15:26:30 <alexlarsson> and it seems to work for me
> Oct 24 15:26:39 <alexlarsson> If i --own-name=org.DBusTest.SignalTest
> Oct 24 15:27:50 <sberg_> so maybe it's related to my unorthodox way of trying
>  to quit the dbus loop there;  if anybody with a clue about dbus would be
>  willing to help me with the above, I'd be very grateful :)
> Oct 24 15:28:06 <alexlarsson> I don't see how the proxy should affect it tho
> Oct 24 15:28:11 <alexlarsson> other than maybe timing?
> Oct 24 15:29:06 <sberg_> maybe; I think I've seen things actually succeed once
>  when I stepped through the proxy somewhat manually
> Oct 24 15:31:01 <alexlarsson> sberg_: eeeentresting
> Oct 24 15:31:07 <alexlarsson> sberg_: so, it does an own-call
> Oct 24 15:31:13 <alexlarsson> sberg_: maybe that is what breaks?
> Oct 24 15:31:33 <sberg_> yeah, that's my dumb speculation
> Oct 24 15:34:38 <alexlarsson> So, you send the close from another thread, not
>  waiting for the reply
> Oct 24 15:34:56 <alexlarsson> then you start working on the main connection
>  immediately
> Oct 24 15:35:02 <alexlarsson> shouldn
> Oct 24 15:35:25 <alexlarsson> shouldn't you grab the mutex after that?
> Oct 24 15:36:35 <alexlarsson> This whole thing smells racy
> Oct 24 15:38:18 <alexlarsson> My guess is that with regular dbus, the flush
>  call will schedule dbus daemon which sends back the message, waking up the
>  other thread before continuing
> Oct 24 15:38:22 <sberg_> alexlarsson, ah, yeah, I see; apparently didn't
>  occur to me back then that I mustn't call dbus_bus_release_name when the
>  execute loop may still be busy
> Oct 24 15:38:25 <alexlarsson> But now you have two context switches
> Oct 24 15:38:37 <alexlarsson> so we continue before we get the reply
> Oct 24 15:38:44 <alexlarsson> eh, not reply
> Oct 24 15:38:46 <alexlarsson> the close message
> Oct 24 15:38:52 <alexlarsson> and then you race
> Oct 24 15:39:11 <alexlarsson> Honestly i don't remember the exact rules for
>  dbus threadedness
> Oct 24 15:39:58 <sberg_> ...so looks like something that can be corrected on
>  the LO side after all; I'll give it a try
> Oct 24 15:40:17 <alexlarsson> you're calling dbus_threads_init_default(), so
>  it should be nominally threadsafe
> Oct 24 15:40:29 <alexlarsson> still, I imagine it can still deadlock
> Oct 24 15:43:12 <alexlarsson> sberg_: i still don't see the exact deadlock
>  though
> Oct 24 15:43:32 <alexlarsson> i imagine working on the separate private
>  connection is threadsafe
> Oct 24 15:43:35 <alexlarsson> and we flush that
> Oct 24 15:44:08 <alexlarsson> then we call dbus_bus_release_name, which i
>  imagine would block if the dbus thread is in read_write_dispatch
> Oct 24 15:44:35 <alexlarsson> The question is, why is the close message not
>  delivered?
> Oct 24 15:44:44 <alexlarsson> I mean, we flushed it...
> Oct 24 15:45:48 <alexlarsson> sberg_: oh, i think i know
> Oct 24 15:45:53 <alexlarsson> sberg_: release_name probably sent some message,
>  but then the other thread pop:ed the reply
> Oct 24 15:46:04 <alexlarsson> sberg_: queue very long wait
> Oct 24 15:51:53 <sberg_> alexlarsson, yeah, sounds plausible; thanks!
> Oct 24 15:52:14 <sberg_> (now that I want to reproduce it, closing succeeds
>  cleanly every time I try, of course...)
> Oct 24 15:54:48 <alexlarsson> sberg_: obviously
> Oct 24 15:55:30 <alexlarsson> sberg_: that just makes the race theory more
>  valid tho
> Oct 24 15:57:31 <sberg_> alexlarsson, yup, after stopping the unrelated
>  background LO build that had put the machine under full load, I see it hang
>  again in release_name, while the execute loop is still happily running too;
>  that nicely confirms your theory
> Oct 24 15:58:28 <alexlarsson> sberg_: alternatively you could tell your users
>  to always build LO in the background
> Oct 24 15:59:04 <sberg_> I'll try to put that into the release notes; lets
>  see...

Change-Id: I2a8a58f9259d2854f42f4aa3db5bb232cf70845d
2017-10-24 17:25:47 +02:00
Stephan Bergmann 54ef1c1559 loplugin:includeform: desktop
Change-Id: I2dacb21cd0c9618dadb49912e0f09c9ab576f9b0
2017-10-23 22:46:10 +02:00
Noel Grandin 87a9979c89 overload std::hash for OUString and OString
no need to explicitly specify it anymore

Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec
Reviewed-on: https://gerrit.libreoffice.org/43567
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23 08:15:35 +02:00
Caolán McNamara aa3c252689 oss-fuzz: drop our own afl related hackery
Change-Id: Ia6a498c07fffd1790ad433287ef4d1cf82085887
Reviewed-on: https://gerrit.libreoffice.org/43695
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-22 21:18:15 +02:00
Cor Nouws 75d78b0943 EPUB export: add simple example to command line help
Change-Id: Ia1a03f324e9b66dc36abadc326843b88b33ed249
Reviewed-on: https://gerrit.libreoffice.org/43348
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-10-12 22:13:57 +02:00
Mike Kaganski 1944e3ddc0 Rename and move SAL_U/W to o3tl::toU/W
Previosly (since commit 9ac98e6e34)
it was expected to gradually remove SAL_U/W usage in Windows code
by replacing with reinterpret_cast or changing to some bettertypes.
But as it's useful to make use of fact that LibreOffice and Windows
use compatible representation of strings, this commit puts these
functions to a better-suited o3tl, and recommends that the functions
be consistently used throughout Windows-specific code to reflect the
compatibility and keep the casts safe.

Change-Id: I2f7c65606d0e2d0c01a00f08812bb4ab7659c5f6
Reviewed-on: https://gerrit.libreoffice.org/43150
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-05 16:02:52 +02:00
Noel Grandin 2c05d758b2 add << operator for css::uno::Exception
Change-Id: Ia23dafd07133779144965682df3b7125a3214235
Reviewed-on: https://gerrit.libreoffice.org/43046
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-10-04 15:18:00 +02:00
Mike Kaganski 532a4dcba6 Replace more reinterpret_cast with SAL_W/SAL_U
Change-Id: Ia632e4083222ad9e7f17c2ad0d0825f189c700cc
Reviewed-on: https://gerrit.libreoffice.org/43071
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-03 16:30:36 +02:00
Mike Kaganski 362a21d3a1 Use explicit function names for fooA/fooW WinAPI; prefer fooW
We should only use generic foo function name when it takes params
that are also dependent on UNICODE define, like
LoadCursor( nullptr, IDC_ARROW )
where IDC_ARROW is defined in MSVC headers synchronised with
LoadCursor definition.

We should always use Unicode API for any file paths operations,
because otherwise we will get "?" for any character in path that
is not in current non-unicode codepage, which will result in failed
file operations.

Change-Id: I3a7f453ca0f893002d8a9764318919709fd8b633
Reviewed-on: https://gerrit.libreoffice.org/42935
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-30 11:23:41 +02:00
Noel Grandin 1ffba0e356 loplugin:flatten check for throw in then clause
also make the plugin ignore the case where we have var decl's in the
clause we want to flatten, which could lead to problematic extension of
variable lifetime

Change-Id: I3061f7104e8c6a460bf74f5eac325a516ec50c59
Reviewed-on: https://gerrit.libreoffice.org/42889
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-29 08:51:48 +02:00
Noel Grandin 2a612907ae loplugin:flatten in connectivity..desktop
Change-Id: Iff59d3049ba40b4338ef8eec67d08a96b0834d2b
Reviewed-on: https://gerrit.libreoffice.org/42578
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-21 15:41:50 +02:00
Mike Kaganski aaa26a58ba Some more WIN32_LEAN_AND_MEAN
Change-Id: Iadb0ebb66809c192fb817b8c7cf2f8cdb4d0b874
Reviewed-on: https://gerrit.libreoffice.org/42419
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-18 19:24:31 +02:00
Noel Grandin 3428bd5fa3 clang-tidy modernize-use-emplace in d*
Change-Id: I79ac90faf24b4c741545e411dbaea7826c2df531
Reviewed-on: https://gerrit.libreoffice.org/42150
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-11 09:44:12 +02:00
Thorsten Behrens bfa662d99a tdf#109202 add help blurp for new --convert-images-to
Change-Id: I5e66263f7ce1b1a8cf15775dc38e08b8f7c0f237
Reviewed-on: https://gerrit.libreoffice.org/41943
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-09-07 17:56:40 +02:00
Miklos Vajna 6d6e78c0ec desktop: fix loplugin:unnecessaryparen warning
Change-Id: I10253c38208da7e5881af7611f80e03059ccc5e5
2017-09-07 12:22:22 +02:00
Mike Kaganski 5aec557b41 Improve error messages for not-standalone command line switches
--printer-name and --outdir are only valid command-line parameters
if they directly follow their parent parameters (--print-to-file
and --convert-to). Placing them out-of-order (e.g., using another
parameter between --convert-to and --outdir) results in a generic
message that --outdir is an unknown parameter.

This change makes more useful message for these errors to avoid
user confusion.

Change-Id: I924e8571eec3de9058fe18be3789ccee2bc98c7d
Reviewed-on: https://gerrit.libreoffice.org/42039
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-07 10:19:20 +02:00
Katarina Behrens a897c5ed86 tdf#109202: pass arg of --convert-images-to to (f)odt filter
Tunelling 1 piece of information through 20 layers of abstraction

Advanced tunelling all the way to sfx2

Exhausted beyond recognition arrived to [Flat]ODF filter

Change-Id: I0597c20c28f5cf8e2c60c4398622b36bda83abd0
Reviewed-on: https://gerrit.libreoffice.org/41777
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-09-05 16:09:06 +02:00
Samuel Mehrbrodt ada87712eb tdf#109202: Convert images via command line parameter, CLI support
Change-Id: Iea65bc24ed9a76ca35f7f91e0867a0853ced93e6
Reviewed-on: https://gerrit.libreoffice.org/41136
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-09-05 15:56:39 +02:00
Samuel Mehrbrodt 2721b5391c Remove useless comment
Who is AS?

Change-Id: I492978e6ed34a78a8bead2e6fea760fcb0ab458b
Reviewed-on: https://gerrit.libreoffice.org/41135
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-05 10:37:22 +02:00
Tor Lillqvist aa7dc5fa1d Get rid of need to use initial :: for ::opencl to avoid clash with sc::opencl
Rename the global opencl namespace to openclwrapper. Its public API is
after all declared in a file called openclwrapper.hxx. The confusion
started when part of the OpenCL code was moved out from sc some years
ago.

Change-Id: I98ebd8498b2244804411e5de9169eb619f86070b
2017-08-25 15:49:34 +03:00
Mike Kaganski 7766135f1c tdf#111908: only freopen if we try to use another console
Change-Id: If513faa4aac03b4c41759445e34cc965ece0b48e
Reviewed-on: https://gerrit.libreoffice.org/41378
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-08-21 09:49:48 +02:00
Markus Mohrhard bfd8a4e22f updater: looser throw specification for what() of exception
Change-Id: Ia73dea0cb845e1fb9a743157bbeadbcfeb1d3627
2017-08-21 00:55:04 +02:00