Commit Graph

4220 Commits

Author SHA1 Message Date
4311e8fb88 tdf#100837: honor LibreOffice command line arguments for Office URIs
This patch allows modifying open mode set in Office URI by using
LibreOffice usual command line arguments. For instance, if there is
-p "ofe:...", then the file won't be open for editing, but instead
will be printed.

Change-Id: I4bde9b6e1c0e92b63ee3834ee1fd8f6e1bd321f2
Reviewed-on: https://gerrit.libreoffice.org/27629
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2016-07-31 09:34:59 +00:00
f2027aabc0 desktop: fix Android build
Change-Id: I1ea8edba2dc34386c2748c3ee2310963252082e6
2016-07-28 10:27:50 +02:00
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
c1b665fcda Restructure CommandLineArgs::ParseCommandLine_Impl
CommandLineArgs::ParseCommandLine_Impl is restructured to remove
multiple redundant booleans and make its structure more clear.
Command line "events" (that specify following filenames treatment)
are grouped to an enum. (NB: "events" is not invented by me, this
is currently used term).

Normalized treatment of --display param: now it is always ignored.
Previously, if it happened to be a known switch like --writer, it
handled as it's not after --display.

Immediate parameters to switches --pt, --convert-to, --outdir,
--printer-name are now treated likewise. They are treated as
corresponding values, even if they happen to be known switches.

--language (without "=") is no more a recognized switch. Before
this it skipped all filenames until next file management switch.

After this gets approved, TODO is to tweak Office URIs to take
current event into account: e.g., to print opened file if it's
after -p.

Change-Id: Ic2f3980548f8906f695d297dc6677bd2cbd19c5b
Reviewed-on: https://gerrit.libreoffice.org/27316
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2016-07-26 12:42:25 +00:00
a860df25dd masses of MessBoxes not being disposed promptly
since...

commit ba81e5c6bd420b41a84ade6ccd774011a8089f7f
Date:   Thu May 28 21:35:43 2015 +0100

    tdf#91702 - fix stack-based MessBox allocation.

There is no special ScopedVclPtr<X>::Create or
ScopedVclPtrInstance<X>::Create just
VclPtr<X>::Create and a raw VclPtr<X>::Create()->foo
doesn't call dispose on the owned X

Change-Id: Ifacc8d5e742820701307c3c37b9b86487667d84f
2016-07-26 11:26:52 +01:00
718d55d141 Fix some misleading comments
Change-Id: I0f29133c3e9b881835b970b2226583ec348828cb
2016-07-25 12:37:34 +03:00
c697ad1a44 tdf#100837: Support Office URI Schemes
This patch adds support for Office URI Schemes (see
https://msdn.microsoft.com/en-us/library/dn906146).
This will enable browser (non-CMIS) integration of LibreOffice
with MS SharePoint server (v.2013 tested).

In this patch, in addition to ms-* schemes, a new scheme is
introduced: vnd.libreoffice.command, which is analogous to ms-*.
Its purpose is to enable flexible configuration of server and
client, where some types of documents are declared as handled by
LibreOffice, and other are handled by other software. E.g., ODTs
may have "vnd.libreoffice.command" scheme, while DOCXs could be
"ms-word". Client may register LibreOffice to handle both, or to
handle only "vnd.libreoffice.command" scheme.

Unit test included.

TODO in a later patch: add a mechanism to register LibreOffice
to the schemes with OS.

Change-Id: I1c449a211102036f87163058a4c90a93eb32c948
Reviewed-on: https://gerrit.libreoffice.org/27094
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-19 07:01:10 +00:00
b91bb2f270 lok: Skip saving unmodified doc if DontSaveIfUnmodified=true
Change-Id: Ia2687bd4bef61df1ff101cab2a19394859b7df58
Reviewed-on: https://gerrit.libreoffice.org/27212
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: pranavk <pranavk@collabora.co.uk>
2016-07-18 05:45:39 +00:00
a2c557d80a Related tdf#37531: Make --cat headless/hidden like --convert-to
...which automatically takes care of the open problem from
08960441558743f222280637985690bb8b41b861 "Related tdf#37531: Handle conversion args
sent over pipe" that --cat terminates the called soffice.

Change-Id: Ief8cdf8c1335749dad1504966d635e0519fe92f7
2016-07-15 23:20:35 +02:00
8d8668be34 Related tdf#37531: --convert-to output relative to caller's CWD
Change-Id: Ifad33650694c16e89fc5e51fd4322da732f7d3eb
2016-07-15 22:58:33 +02:00
0896044155 Related tdf#37531: Handle conversion args sent over pipe
However:
* "soffice --convert-to pdf foo.odt" creates foo.pdf in the called soffice's
  CWD, not the caller's.
* "soffice --cat foo.odt" prints to the called soffice's stdout, not the
  caller's (though this will unlikely ever be fixed), and then also terminates
  the called soffice.

Change-Id: I2f4420881b2bee00b0476c76f739966c13101be4
2016-07-15 18:15:07 +02:00
24d0a0549d Log PipeIpcThread communication
Change-Id: I9e818351a435d39a9d1d8988214185f5bc504e8c
2016-07-15 18:09:55 +02:00
6e72f0251b new loplugin unnecessary override
Change-Id: I88d3e33823d68745b98625050a8a274f9ef04bcb
Reviewed-on: https://gerrit.libreoffice.org/27135
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-15 14:05:41 +00:00
4dd0d77675 sc lok: add more toolbar items
.uno:SortAscending
.uno:SortDescending

Change-Id: I3d307b43fb18ffce75b00a0b919b63320bf6db05
Reviewed-on: https://gerrit.libreoffice.org/27223
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2016-07-14 17:34:54 +00:00
e9a1afbd3e tdf#100883 - opencl impls. that use SEH are still bad.
Amazingly we fell-back to the old calculation path for
crashes in older LibreOffices, might as well have this on master.

Change-Id: Ifc1de41c93329207d7a1917c736e361d840c2821
Reviewed-on: https://gerrit.libreoffice.org/27166
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2016-07-12 20:01:25 +00:00
605a5dc088 opencl: bail out early in missing OpenCL case.
Change-Id: I2ff1466ec89f4ad9743cedbfa5dd52be8bf86590
Reviewed-on: https://gerrit.libreoffice.org/27136
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-07-12 09:00:32 +00:00
c44726c482 desktop: validate OpenCL drivers before use.
OpenCL validation needs to happen before drivers are used in
anger. This should isolate any crashes, and/or mis-behavior to
We use app version, CL driver version and file time-stamp to
trigger re-testing the device. If anything fails: hard disable
OpenCL.

We use an opencl validation sheet (cl-test.ods) and install it.
It is a minimal CL set - it requires a very short formula group
length, and combines several CL functions into few formulae to
test more.

The sheet structure, in particular the manual squaring / SQRT is
necessary to stick within the default CL subset, and ensure that
formulae are CL enabled from the root of the dependency tree up.

Change-Id: I18682dbdf9a8ba9c16d52bad4447e9acce97f0a3
Reviewed-on: https://gerrit.libreoffice.org/27131
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2016-07-12 08:39:01 +00:00
f541b99855 loplugin:nullptr: Better heuristic to determine code shared between C and C++
Change-Id: I51e1c5fa4639e51fac90f92adf3d87d12960d589
2016-07-11 14:32:07 +02:00
cc8ffd0f49 lok: disable unused UNO commands
Change-Id: I9804c1c8528747e719971f51b59d0a01a9fba878
Reviewed-on: https://gerrit.libreoffice.org/27091
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2016-07-10 18:09:56 +00:00
af8419fa1d sw lok: add LOK_CALLBACK_VIEW_CURSOR_VISIBLE
With this, in case a text cursor is turned into a graphic selection in
view#0, then view#1 can also hide the text cursor of view#0.

Change-Id: I7de89b8537ef8b0985336793b719d93733604bff
Reviewed-on: https://gerrit.libreoffice.org/27044
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-08 13:46:10 +00:00
17cb84338d Resolves: tdf#100713 on cancel curData points to deleted parents vector entry
Change-Id: Ic2f313c357ce9526eb045791e2d27451e52a7572
2016-07-08 13:01:56 +01:00
b2c6c91391 Related: rhbz#100713 move extensions restart to a better place
move it to when the dialog is closed rather than trying to
launch it as soon as any modifications take place because
those are happening during threaded code and the restart
is always cancelled by the dialog itself leading to repeated
restart dialogs

Now at least it doesn't crash, but if we open an oxt on the command
line, a restart will reopen it, which is probably not what we want.
Maybe this restart on an extension modification is a bad idea in
the first place.

Change-Id: Ib7d6179e6703ed3353fce44c3e54f5be1c1dfa68
2016-07-08 12:14:54 +01:00
cb53d9c4a2 loplugin:passstuffbyref also for {css::uno,rtl}::Reference
Change-Id: Ibeb53a944551b9a654979fefaae85ba3f82c52fb
2016-07-07 18:59:55 +02:00
84e4786e6a sc lok: add number format toolbar items
Change-Id: I420750d99d5998cb589d0d6ec0fb6555c41a85cf
Reviewed-on: https://gerrit.libreoffice.org/27015
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2016-07-07 16:58:33 +00:00
880e013d7c sc lok: add toolbar item wrap text and merge cells
Change-Id: I266b7171ee0a8a324ee8f71680f76c132b5c5fbd
Reviewed-on: https://gerrit.libreoffice.org/26985
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2016-07-06 18:05:12 +00:00
7eaf8b17dd clang-tidy performance-implicit-cast-in-loop
...where the first component of the pair returned by the iterator would be
const, so an implicit conversion would be required.

Change-Id: I62b6ddd799261e1dd63ea5c42a85d8b071f8b8b7
2016-07-06 18:05:06 +02:00
f4c68d3ad8 use a dynamic library for minidump shared code
This has the disadvantage to make the minidump_upload executable depend on LibreOffice libraries but there seems to be no other way to make the 7.1 SDK happy.

Change-Id: I82c37f503ed29cb50711eae7db22063f49747a48
Reviewed-on: https://gerrit.libreoffice.org/26055
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
(cherry picked from commit 3498cd3e7b2c820fc3f3025eb4434666a444fda1)
Reviewed-on: https://gerrit.libreoffice.org/26915
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2016-07-05 11:02:50 +00:00
428e23f4f7 Fix some spelling errors in comments and strings
Change-Id: Iecd6b5e13d6be14651f77d8e37f01117ba15a11e
Reviewed-on: https://gerrit.libreoffice.org/26883
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-07-04 06:11:36 +00:00
bad68fd0b4 sd: add status bar UNO commands
Change-Id: I7da065edf76ccdbf9e410756c4d1fe81462975ed
Reviewed-on: https://gerrit.libreoffice.org/26881
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2016-07-03 14:20:02 +00:00
f41c20dc23 sw lok: add status bar UNO commands
Change-Id: I4ffa3a3e07d00cfac48e67a0c32e85de0eda803d
Reviewed-on: https://gerrit.libreoffice.org/26876
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2016-07-03 03:58:52 +00:00
7e3e55c39e sc lok: add status bar UNO commands
Change-Id: I2dbed808a23609773baf9154820a7121c7919c70
Reviewed-on: https://gerrit.libreoffice.org/26809
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2016-07-02 23:44:36 +00:00
3ebfc5b955 svx lok: add LOK_CALLBACK_GRAPHIC_VIEW_SELECTION
So a view can be aware where the graphic selections of other views are.

Change-Id: I0cc420cfe4bf3824fbfa1a58da889cac5e9a7b60
Reviewed-on: https://gerrit.libreoffice.org/26863
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-01 17:20:17 +00:00
68c5c0bb7e sc lok: add LOK_CALLBACK_CELL_VIEW_CURSOR
So a view can be aware where the cell cursors of other views are.

Change-Id: Ifcf06c0019c6af8b859e2e92222e4f3fd18da74f
Reviewed-on: https://gerrit.libreoffice.org/26844
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-01 09:28:49 +00:00
615c37503c LOK: change back type of view ids to int
Commit 45c2410041c48c22bd860efb42d4daadad7869b0 (LOK: change type of
view ids to uintptr_t, 2016-06-17) fixed the problem of view IDs being
reused for the price of random IDs, which makes debugging harder.

Implement a simple shellToView() function that makes sure view IDs are
not reused, and stop exposing view shell pointer addresses, which allows
reverting the LOK API change.

Change-Id: I63089e6de08ee7e1c7706757d43a11f6cf4d6e06
Reviewed-on: https://gerrit.libreoffice.org/26773
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-06-30 06:16:28 +00:00
22864b44fd loplugin:singlevalfields in dbaccess
Change-Id: I5c8990187b2b488eb75369c2a3e3dc7f855ce06a
Reviewed-on: https://gerrit.libreoffice.org/26633
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-27 05:18:07 +00:00
bb19a820e8 Revert "desktop: fix loplugin:oncevar"
This reverts commit 8dc2873081bff3fe7107d472a91a24af8b67a87d. Instead of
working around the warning, the plugin will be disabled, as its warnings
are not useful in all cases.
2016-06-23 09:44:19 +02:00
2c1056d679 tdf#46279 Show restart message after extension installation
Change-Id: I91feab63b77055b8f73d0fb481a76586b249160c
Reviewed-on: https://gerrit.libreoffice.org/24595
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-23 06:44:23 +00:00
aa0d0536a4 tdf#97527 - vcl: reference-count Menu
some places are marked with "dodgy"- need to check those to see
what is going on, because they are leaving dangling pointers behind
in the Menu class

Change-Id: I41d5c7c0fec2f70ce9e3ffdc48cd03d26c0a869b
Reviewed-on: https://gerrit.libreoffice.org/26516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-23 06:28:00 +00:00
8dc2873081 desktop: fix loplugin:oncevar
Change-Id: I51b5d199c79c644906df355c8fbd33e5c98e7d89
2016-06-22 12:17:39 +02:00
d7b45c97b3 lok: Change version string to JSON format
Change-Id: Ie1264fed9964b09006980df2e151e170b48b4082
2016-06-21 22:08:51 +05:30
90c75f775b lok: Expose LO version information
Change-Id: Ided924e928c04385457c7a2e231fdf57e7e38970
2016-06-21 14:35:59 +05:30
62c047ffb3 switch to EHs on windows
This seems to be a good idea based on several discussions
in the project. In the end catching SEH exceptions is just
going to cause strange platform dependent bahavior.

This patch is based on on
http://thread.gmane.org/gmane.comp.documentfoundation.libreoffice.scm/39102/focus=55516
and includes some additional cleanup of the sal signal code.

Change-Id: Iedc998e37e6495afec445eccb60fa1c2b1a7defd
Reviewed-on: https://gerrit.libreoffice.org/26497
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-06-20 15:18:45 +00:00
c544a8b674 sw lok: add LOK_CALLBACK_INVALIDATE_VIEW_CURSOR
So a view can be aware where cursors of other views are.

Change-Id: I6133fb55aa2869843c0284b7d76264bab3b3d5da
Reviewed-on: https://gerrit.libreoffice.org/26513
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-06-20 15:12:54 +00:00
cf5208b671 Convert PART to scoped enum
Change-Id: If4c2849beb207593d3d450ae3846ed24eaf66ca4
Reviewed-on: https://gerrit.libreoffice.org/26173
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-20 09:33:49 +00:00
e6a92c9237 loplugin:unusedvariablecheck
Change-Id: I8bd6447915942c1869ec186d8ca01e5ac43b3e8a
2016-06-18 17:02:43 +02:00
909d87cc61 move the code for tdf#99410 to the sal init windows code
Change-Id: I4ead30fa1736a3a99fb3379e89367934c8df2809
Reviewed-on: https://gerrit.libreoffice.org/26444
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Jenkins <ci@libreoffice.org>
2016-06-18 14:23:54 +00:00
45c2410041 LOK: change type of view ids to uintptr_t
This fixes the following problem:

- createView() = 1
- createView() = 2
- destroyView(1)

and then view #2 was renumbered to 1.

Instead expose the pointer address of the SfxViewShell as the ID, which
is not changing in such a situation.

Note that the SfxViewShell <-> ID mapping is an implementation detail of
SfxLokHelper, and only pointers are converted to IDs, user-supplied IDs
are never converted back to pointers.

Change-Id: If79ef8b99ba391011b5d82b219ad13447d44cd5a
Reviewed-on: https://gerrit.libreoffice.org/26423
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-06-17 16:00:44 +00:00
5b5706f41f comphelper lok: remove the g_bViewCallback global
Its purpose was to allow incrementally migrate all callers of
SdrModel::libreOfficeKitCallback() to use
SfxViewShell::libreOfficeKitViewCallback() (which allows notifying only
the currently active or all views) instead. That is done by now, so it
can go.

Change-Id: I521bbbe5c638dfd844ebf025153459a37362d3c3
Reviewed-on: https://gerrit.libreoffice.org/26413
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-06-17 12:47:46 +00:00
5bf3ae663a comphelper: enable LibreOfficeKit::isViewCallback() by default
This requires porting the sw/sd/sc_tiledrendering test code to the new
internal API, as only the public LOK API is unchanged.

Change-Id: Ic6a2f96421da4a16bdee7d0cbb3f6e35bc6ddff9
Reviewed-on: https://gerrit.libreoffice.org/26379
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-06-16 16:19:10 +00:00
a93217908d sw lok: move filtering of callbacks during paint to desktop
This will be important when in the per-view case
SwViewShell::libreOfficeKitCallback() won't be called anymore; as
pointed out by online.git's TileCacheTests::testSimpleCombine() test.

Change-Id: Ie68f8c51facdba127763df660e9220f820805ecc
Reviewed-on: https://gerrit.libreoffice.org/26372
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-06-16 14:33:41 +00:00