Commit Graph
1223 Commits
Author SHA1 Message Date
Andrea Gelmini 9419850120 Fix typo
Change-Id: I8d011f948f1e9876a5b22f921c01eab898e8256d
Reviewed-on: https://gerrit.libreoffice.org/75151
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-06 08:50:09 +02:00
Noel Grandin 4583911575 improve loplugin:simplifyconstruct
Change-Id: If863d28c6db470faa0d22273020888d4219e069e
Reviewed-on: https://gerrit.libreoffice.org/74559
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-25 13:53:21 +02:00
Andrea Gelmini d6e325eb4e Fix typo
Change-Id: I580bfda7af2f29484817d8e88ba74cb3c43a98fd
Reviewed-on: https://gerrit.libreoffice.org/74560
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-23 13:08:43 +02:00
Andrea Gelmini 7b8a0044a3 Fix typo
Change-Id: Icf137874b218c0123c3e8bcf4759543f97830ddd
Reviewed-on: https://gerrit.libreoffice.org/74556
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-22 12:35:20 +02:00
Andrea Gelmini d91df3d3c6 Fix typo
Change-Id: Ia487ac5af064184d3e7c598e2edcee80b949a857
Reviewed-on: https://gerrit.libreoffice.org/74558
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-22 12:34:34 +02:00
Andrea Gelmini 40ed0e9af2 Fix typo
Change-Id: Ic1ea1e5d0fbea39c99845817c1646865d6ccd53e
Reviewed-on: https://gerrit.libreoffice.org/74553
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-22 10:49:44 +02:00
Andrea Gelmini 835ea7bacd Fix typo
Change-Id: I7d977cd56a8bb820a62718ea548c34f2c26b4db7
Reviewed-on: https://gerrit.libreoffice.org/74552
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-22 09:20:39 +02:00
Mike Kaganski cb28e48bfd Drop INetURLObject::GetName and INetURLObject::GetExtension
They are just synonyms for GetLastName and GetFileExtension resp.

Change-Id: Ic498c7025cc421b830394ed94d64529fd74fe7dd
Reviewed-on: https://gerrit.libreoffice.org/74448
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-06-21 00:47:22 +02:00
Noel Grandin 7508c1d1e7 loplugin:logexceptionnicely in filter..framework
Change-Id: I8cf70ee278c641767e3fcfcfd151d99d791b3468
Reviewed-on: https://gerrit.libreoffice.org/74098
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-16 08:55:07 +02:00
Julien Nabet 4195323c05 Typos
Change-Id: If8a5aaba35afb270ce30d49b55a0106e020dfbe0
Reviewed-on: https://gerrit.libreoffice.org/73695
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-08 10:19:32 +02:00
Arkadiy Illarionov 966f40eecf Use hasElements to check Sequence emptiness in [e-i]*
Similar to clang-tidy readability-container-size-empty

Change-Id: I79e31919db8f4132216f09a7868d18835eeb154b
Reviewed-on: https://gerrit.libreoffice.org/71795
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-31 16:10:17 +02:00
Stephan Bergmann 04d3e31e38 PathInfo::takeOver does same as copy assignment op
(but even better to actually use move assignment op)

Change-Id: I6d9c4a9568ef03d84b7acd48a129d0c723c915cb
Reviewed-on: https://gerrit.libreoffice.org/72820
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-23 13:58:17 +02:00
Tor Lillqvist d5c6efa206 Don't call Application::Quit() in Desktop::terminate() on iOS
When exiting from a document in the iOS app, the Application::Quit()
would post an ImplQuitMsg user event that would however not be handled
for that document. Instead, it would be handled by the next document
opened and thus the code would immediately stop editing the document,
causing grief.

Change-Id: Id24c843b3f329673035da55f53c2134265fce003
2019-05-16 13:24:42 +03:00
Noel Grandin a361231b13 fix wrong SET/QUERY flags passed to uno::Reference
By creating deleted methods for the wrong calls.

Avoids the compiler needing to construct a temporary

Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a
Reviewed-on: https://gerrit.libreoffice.org/72103
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-13 08:15:27 +02:00
Caolán McNamara fbc038cc4f an uno -> a uno
Change-Id: I538db88f8477dd2d2ad25c372928fec6c11d979d
Reviewed-on: https://gerrit.libreoffice.org/72105
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-10 14:50:59 +02:00
Caolán McNamara 1156f981ac an is used before a vowel sound
not before vowels with a consonant sound so its a url not an url

Change-Id: Ic27ff3bee67469284d460c31ced6f63cb3633db2
Reviewed-on: https://gerrit.libreoffice.org/72062
Reviewed-by: Jens Carl <j.carl43@gmx.de>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-10 10:01:13 +02:00
Noel Grandin 3fce6ae224 fix usage of successful/successfully in comments
Change-Id: If280e1e944c877462cb84b579e19d4fd2ad1900b
Reviewed-on: https://gerrit.libreoffice.org/70813
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-16 12:46:55 +02:00
Noel Grandin bf9f0b2973 loplugin:sequentialassign in framework
Change-Id: I98da731a0f6b72ea0cb890dae2f25992c75a0984
Reviewed-on: https://gerrit.libreoffice.org/70701
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-13 14:47:12 +02:00
Mike Kaganski 5a824268df Don't use resettable/clearable guard where plain guard is enough
Also use scope where possible. This allows to limit guard scope at
language level; visualises the scope clearly; and helps avoiding
errors like fixed in commit 61e4437c85.

Change-Id: Ifeca96e2df8e8a0897770d9546b2536806275f41
Reviewed-on: https://gerrit.libreoffice.org/70376
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-07 17:53:04 +02:00
Jens Carl 68dd147bd3 Fix typos
Change indefinite article "an" to "a" before
the word unique and some variants.

Change-Id: Ia14a6f3b9ec6b257ad8bed3b089faa9b6f07d44f
Reviewed-on: https://gerrit.libreoffice.org/70174
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-03 08:54:15 +02:00
Noel Grandin a2e3705d8b loplugin:unnecessaryparen improve member expression
Change-Id: I304621018cb1e2a47e478e86df4229bcf2176741
Reviewed-on: https://gerrit.libreoffice.org/68757
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-06 06:47:06 +01:00
Samuel Mehrbrodt 40431b12b8 clang-format DispatchHelper
To reduce excessive whitespace in function definitons

Change-Id: I8dbf58e5ba53ddcf6c5a8e212636c1306584aa2e
Reviewed-on: https://gerrit.libreoffice.org/68533
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-03-01 10:14:20 +01:00
Samuel Mehrbrodt 81e9703cf8 Use lambda instead of std::bind + wrapper function
Change-Id: I52ef7c61d615120b172268b78827affa9b5f8f96
Reviewed-on: https://gerrit.libreoffice.org/68532
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-03-01 10:12:15 +01:00
Noel Grandin d55fb1552f loplugin:unusedfields in framework
Change-Id: I7c633bf3e217a71c51bd3781fe716cb06fe92b0c
Reviewed-on: https://gerrit.libreoffice.org/68227
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-24 07:39:23 +01:00
Arkadiy Illarionov 44841a6778 Simplify containers iterations in [f-l]*
Use range-based loop or replace with STL functions

Change-Id: Ib3fab47318d1bfbb4df8f886a8cd9596525a420f
Reviewed-on: https://gerrit.libreoffice.org/67914
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-18 07:41:05 +01:00
Noel Grandin cfadf87cf5 loplugin:indentation in framework
Change-Id: I9d0ef502eb812499b0372436083f673bb19ff578
Reviewed-on: https://gerrit.libreoffice.org/67557
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-09 17:07:24 +01:00
Miklos Vajna 22aa6508e0 framework: allow dispatching a command on the main thread
This is similar to commit 2dc3a6c273
(framework: allow loading a component on the main thread, 2018-12-19),
just it allows saving (via .uno:Save) and other commands operating in a
similar environment.

The use-case is that once a document is loaded on the main thread (see
commit message of the above mentioned commit), then saving also has to
happen on the main thread, or OLE objects on Windows may be lost.

Change-Id: I7321659550b556e96085ac20f197a87d5d13f1ed
Reviewed-on: https://gerrit.libreoffice.org/67089
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2019-01-29 19:10:56 +01:00
Miklos Vajna 2dc3a6c273 framework: allow loading a component on the main thread
The user-visible problem was that embedded (OLE) objects contained in a
document that was loaded on a thread were not editable.

This works in the loaded-with-UI case because the Windows version of the
SalData constructor in vcl calls CoInitialize() (which sets the
concurrency model of the main thread to STA) and then later the
OleComponent constructor in embeddedobj calls OleInitialize(), which
just realizes that the concurrency model is already set, and OLE editing
works.

However, if the document is loaded on a thread, things are different.
The concurrency model of the thread is set to MTA in
oslWorkerWrapperFunction() in sal, so the later OleInitialize() will
fail with RPC_E_CHANGED_MODE, as it's not possible to set the
concurrency model of a thread once it's set.

Solve the problem by providing in opt-in way to execute the actual
import on the main thread, since remote UNO clients always invoke
Desktop::loadComponentFromURL() on a thread.

Change-Id: I94f2721b599c3ae3e2ebc1c90dea649a69d51ef7
Reviewed-on: https://gerrit.libreoffice.org/65453
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2018-12-19 21:55:10 +01:00
Gabor Kelemen 00b49f9ff9 tdf#42949 Fix IWYU warnings in include/vcl/s*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ie87d27dd2c385a63349e0b322fd067ba03d2d152
Reviewed-on: https://gerrit.libreoffice.org/64479
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-10 14:19:50 +01:00
Jan-Marek Glogowski 329db5d412 Make Application::SetDialogCancelMode "private"
Change callers to Application::EnableHeadlessMode instead except
for the Frame dispose sequence, which has to disable a fatal
mode temporary.

Since Frame is not a unique identifier, rename it to XFrameImpl,
otherwise we get a "non-unique" compile error for other files.

When we update our gcc baseline, we should be able to forward
declare and friend XFrameImpl and really make it private.

Change-Id: Ifcad0355adade8f6539ec092b174dd70af8352c2
Reviewed-on: https://gerrit.libreoffice.org/64050
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-12-05 14:38:22 +01:00
Noel Grandin e4472d3c13 loplugin:unnecessaryparen include more assignments
Change-Id: I9fb8366634b31230b732dd38a98f800075529714
Reviewed-on: https://gerrit.libreoffice.org/64510
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05 07:49:30 +01:00
Mike Kaganski eddee22b0e tdf#120703 PVS: V560 A part of conditional expression is always true/false
Change-Id: Id7af9a6eaefc8b49a790eb299620c4fa97067a11
Reviewed-on: https://gerrit.libreoffice.org/64429
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-03 01:20:21 +01:00
Andrea Gelmini f0bf6a4178 Fix typo deactive
Change-Id: I68a87a9435784f949f1e7b730270641bd8e05b43
Reviewed-on: https://gerrit.libreoffice.org/63149
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-11-28 15:33:45 +01:00
Jan-Marek Glogowski 6cdfe5ebb4 Drop some headless mode variants
This fixes OSX "make debugrun" by dropping VCL_HIDE_WINDOWS
handling and removing the internal GetPseudoHeadless() API.

While at it moves the DialogCancelMode enum out of Application.

Change-Id: I4876e752ddbfc39dd44faa673fb0e97810089a75
Reviewed-on: https://gerrit.libreoffice.org/61598
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-11-20 09:19:09 +01:00
Andrea Gelmini 0143e97645 Fix typos
Change-Id: Ic7a29f572ce4c42cc88e5d45ebbb774c4b21aaa0
Reviewed-on: https://gerrit.libreoffice.org/63488
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-11-17 19:35:38 +01:00
Andrea Gelmini b12acadfea Fix typos
Change-Id: Ie41eaccb9a70769e43b945595039f6f598e78c8a
Reviewed-on: https://gerrit.libreoffice.org/63489
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-11-17 19:34:53 +01:00
Andrea Gelmini 32865e69c9 Fix typos
Change-Id: I63b3cdae2dfb4442d10430d9041145f892b31967
Reviewed-on: https://gerrit.libreoffice.org/63480
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-11-16 23:11:03 +01:00
Andrea Gelmini e10d196ab7 Fix typos
Change-Id: Id5489f3e8f1d3ced3d57b56f8d3a7a4818af0fca
Reviewed-on: https://gerrit.libreoffice.org/62377
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2018-11-05 22:04:17 +01:00
Noel Grandin 6f50961e69 remove more rtl::OUString and OString prefixes
which seem to have snuck back in since the great rounds of removals.

Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1
Reviewed-on: https://gerrit.libreoffice.org/62229
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-24 14:43:34 +02:00
Noel Grandin 2c1b7e8d6a clang-tidy readability-container-size-empty
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422
Reviewed-on: https://gerrit.libreoffice.org/61967
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19 10:02:39 +02:00
Noel Grandin e61e4e5699 clang-tidy readability-misleading-indentation
Change-Id: I4673fc7c694924b41d048a1918ddb8b0e0af1f79
Reviewed-on: https://gerrit.libreoffice.org/61935
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19 07:58:15 +02:00
Eike Rathke e30f6a8c6b tdf#119739 split ConfigManager::getLocale(), getUILocale(), getWorkLocale()
To prevent further confusion which is which, dbaccess
UserInformation already got that wrong since ever.

/org.openoffice.Setup/L10N/ooLocale is the UI locale.
/org.openoffice.Setup/L10N/ooSetupSystemLocale is the work locale.

Confusingly due to legacy when the setup program was a separate
binary that picked the UI ooLocale and later set up the default
(system) work locale as well.

Change-Id: I9a05ad39f5fb65c54076ff5789ba7a2cc06ad23a
Reviewed-on: https://gerrit.libreoffice.org/61725
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
2018-10-12 19:25:14 +02:00
Andrea Gelmini 2a7fe9b08d Fix E_SUCCEDED -> E_SUCCEEDED
It passed "make check" on Linux.

Change-Id: I96b34c818f6d4170c110ecd1fb93af79c3279e57
Reviewed-on: https://gerrit.libreoffice.org/61028
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-09-28 08:24:01 +02:00
Stephan Bergmann 206b5b2661 New loplugin:external
...warning about (for now only) functions and variables with external linkage
that likely don't need it.

The problems with moving entities into unnamed namespacs and breaking ADL
(as alluded to in comments in compilerplugins/clang/external.cxx) are
illustrated by the fact that while

  struct S1 { int f() { return 0; } };
  int f(S1 s) { return s.f(); }
  namespace N {
    struct S2: S1 { int f() { return 1; } };
    int f(S2 s) { return s.f(); }
  }
  int main() { return f(N::S2()); }

returns 1, both moving just the struct S2 into an nunnamed namespace,

  struct S1 { int f() { return 0; } };
  int f(S1 s) { return s.f(); }
  namespace N {
    namespace { struct S2: S1 { int f() { return 1; } }; }
    int f(S2 s) { return s.f(); }
  }
  int main() { return f(N::S2()); }

as well as moving just the function f overload into an unnamed namespace,

  struct S1 { int f() { return 0; } };
  int f(S1 s) { return s.f(); }
  namespace N {
    struct S2: S1 { int f() { return 1; } };
    namespace { int f(S2 s) { return s.f(); } }
  }
  int main() { return f(N::S2()); }

would each change the program to return 0 instead.

Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c
Reviewed-on: https://gerrit.libreoffice.org/60539
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-17 09:05:38 +02:00
Noel Grandin 8dc6c96a80 loplugin:simplifyconstruct in filter..framework
Change-Id: Ida4307a92dfb1dbd14da5a30b6ee1f0fd6a9455e
Reviewed-on: https://gerrit.libreoffice.org/60194
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-08 19:28:19 +02:00
Noel Grandin 37d9322237 loplugin:useuniqueptr in framework::Frame
Change-Id: Ic1350d5bff80d4a88d3949a412ee9bf02ad969ba
Reviewed-on: https://gerrit.libreoffice.org/60050
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-06 08:32:41 +02:00
Noel Grandin 2c3b5e0691 fix for crash in CppunitTest_services on windows
after
    commit 9cceba9a92
    make DBG_TESTSOLARMUTEX available in assert builds

bt looks like:

 #0  0x00007faf569074fd in ImplDbgTestSolarMutex()
 #1  0x00007faf56904df9 in vcl::EventPoster::~EventPoster()
 #2  0x00007faf4392b452 in AutoRecovery::~AutoRecovery()
 #3  0x00007faf4392b589 in AutoRecovery::~AutoRecovery()
 #4  0x00007faf5d03dfc8 in __run_exit_handlers()

Change-Id: If72eece22db89b492d8e69d1abb496168e32cb9d
Reviewed-on: https://gerrit.libreoffice.org/58636
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-06 11:13:06 +02:00
Andrea Gelmini 1de9dc5ff7 Fix typos
Change-Id: If8897807f065a342ef0e7f923199660079a70d22
Reviewed-on: https://gerrit.libreoffice.org/58123
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2018-07-31 11:30:58 +02:00
Gabor Kelemen bdb0775a26 Add missing sal/log.hxx headers
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it.
This is a continuation of commit 6ff2d84ade to be able to remove those unneeded includes.

This commit adds missing headers to every file found by:
grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG')
to directories from filter to jvmfwk

Change-Id: I2a73d63f2aaef5f26d7d08957daaa8a30b412ac5
Reviewed-on: https://gerrit.libreoffice.org/58204
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-30 09:28:40 +02:00
Andrea Gelmini 836efb7879 Fix typo
Change-Id: I5daaf19dab60a07033fd28499ba8ad25607777d9
Reviewed-on: https://gerrit.libreoffice.org/58127
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2018-07-29 17:31:51 +02:00