150 Commits

Author SHA1 Message Date
Marco Cecchetti
eb399d69aa LOK - Calc: Increase the row limit to 10.000 rows.
Change-Id: Ie91e4caf33d3b31df4c3de8dc6e78e223dc1e4b3
Reviewed-on: https://gerrit.libreoffice.org/34216
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2017-02-13 20:07:42 +00:00
Marco Cecchetti
9ba5eb228d sc rowlimit: Make the cursor better fit the rendering.
Change-Id: If4d02161bd8a37100d7403c05ea0840a3d2d0cf8
2017-02-04 00:50:05 +01:00
Caolán McNamara
2562ad74d1 stoi not a member of std under android toolchain
Change-Id: I73a4e7894e33dd95ca50ea25f5f95bf94a43531e
2017-02-01 10:22:17 +00:00
Jan Holesovsky
be71e2b860 Revert "Lok: support for batch API calls"
This was for the moment removed from the online.git, so let's disable the API
bits too before it shows this is really necessary.  Reverts also:
Revert "Lok: unittest batch API"

Change-Id: I7bf3fe62d1e73b6f233992d51f587868a78f4bec
2017-01-31 17:45:29 +01:00
Pranav Kant
8a7c459f6a lok: Allow to edit comment by postit id
Change-Id: Ice1d40b7813226fe99c423047392b3416d763dd4
Reviewed-on: https://gerrit.libreoffice.org/33614
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: pranavk <pranavk@collabora.co.uk>
2017-01-30 12:14:56 +00:00
Pranav Kant
4f60b300d2 lok: Unit test for comments api
Change-Id: Ieedb50a4d376c1214ea23b56c8cab19c96c159d0
Reviewed-on: https://gerrit.libreoffice.org/33615
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-01-27 16:16:25 +00:00
Ashod Nakashian
f6c0e851ef Lok: unittest batch API
Change-Id: I33bc59756f46b51a69efd91b89813ba17eca6218
Reviewed-on: https://gerrit.libreoffice.org/33403
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-23 05:35:52 +00:00
Ashod Nakashian
3db1ce30ab Lok: improved tile invalidation compression
Handle corner cases better and eliminate
invalid rects and out-of-bounds coordinates.

Change-Id: Ib9247ae4f0306cf68937cd2678f6386fe7710eec
Reviewed-on: https://gerrit.libreoffice.org/31665
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-01-16 09:09:33 +00:00
Caolán McNamara
2ac9ea00c0 bodge fix build
Change-Id: I5ef90ad7bf39618cc65641ffa85d056adc48d555
2016-12-22 10:28:32 +00:00
Stephan Bergmann
9b8fb82150 loplugin:unnecessaryoverride
Change-Id: Iac074bd6f59d2fc890459b45801d0a6143c3eb9e
2016-12-06 10:20:01 +01:00
Ashod Nakashian
a8b2e3e948 Lok: disable DesktopLOKTest::testTileInvalidationCompression
For some reason this test fails on TinderBox and for others
while passing on Jenkins on all platforms.

This might be related to the compiler version used.

Disabling until resolved.

Change-Id: Ic05dbb290818506c78ceaa4c416fb00e8c0dc8da
Reviewed-on: https://gerrit.libreoffice.org/31607
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-05 04:04:50 +00:00
Ashod Nakashian
9c218858f1 Lok: correct tile invalidation merging
Rectangles that are empty (i.e. IsEmpty() returns true)
were incorrectly considered to mean equivalent to "EMPTY".
The latter means full-area, while the former mean zero-area.

This fixes the issue by restrict full-area to rectangles
with 2 billion units on the each side (roughly INT_MAX) or
more, and using this new check rather than IsEmpty().

Change-Id: I12aca17267f5dd33b2932012d1d9db3545f9af6f
Reviewed-on: https://gerrit.libreoffice.org/31458
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-02 12:54:06 +00:00
Miklos Vajna
49f658f568 svl: fix loplugin:cppunitassertequals warnings
Change-Id: Ice929418e46ff42517a47dfcd5888a5cce36ae51
Reviewed-on: https://gerrit.libreoffice.org/31523
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-12-02 09:04:07 +00:00
Ashod Nakashian
f80140bf3a Lok: compress duplicate state-changed events
STATE_CHANGED callback events that have the form
of name=value are only removed when newer ones
are identical. This is not very helpful since
often the same name (i.e. state type) changes
its value and we need to superseed older ones
with new values.

This patch makes sure that a STATE_CHANGED with
a given name has its latest value and doesn't
change multiple times while in the queue.

Change-Id: Ibfa18359464d7137411e5846b1c6d415a0aad43d
Reviewed-on: https://gerrit.libreoffice.org/31258
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-27 16:44:33 +00:00
Stephan Bergmann
7c70681bf7 loplugin:unnecessaryoverride (dtors) in desktop
Change-Id: I9153f2506a9d054ec2e81a5c0d6f9bb089b73f64
2016-11-23 23:11:00 +01:00
Mike Kaganski
24a24e65ca tdf#100826: use console for -h and --version also on Windows
This removes the dialog used to show version information and
command line help on Windows. Now, selecting and scrolling becomes
possible, code is simplified and unified under all platforms.

Change-Id: Ia749bbb62d697eff655b3a646859c1986a023ec0
Reviewed-on: https://gerrit.libreoffice.org/31059
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2016-11-23 16:47:39 +00:00
Henry Castro
3aac26671d lok: add command values .uno:FontSubset
Conflicts:
	desktop/Library_sofficeapp.mk

Change-Id: Id36a98c32f0eb5e88e4e9a714e260a71d7465c05
Reviewed-on: https://gerrit.libreoffice.org/31033
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2016-11-22 00:56:46 +00:00
Samuel Mehrbrodt
ec4e48c750 Fix typos
Change-Id: I3e38b1d445c368c28e807202b94c603bd2b2c672
Reviewed-on: https://gerrit.libreoffice.org/30872
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-11-15 14:51:34 +00:00
Stephan Bergmann
8cfa3f4b52 'make screenshot' use-after-free fixes
Change-Id: I4302d0d767a1bf50fd34a78e9aa0ad6d6b0c7a22
2016-11-10 22:00:41 +01:00
Stephan Bergmann
d543b4df80 'make screenshot' loplugin fixes
Change-Id: Ibebcd1c1ebfea0ecdf9d90b6f8bcc8ceb87df456
2016-11-10 22:00:41 +01:00
Miklos Vajna
ef7ab996d8 CppunitTest_desktop_lib: fix valgrind errors
With this, 'make -sr CppunitTest_desktop_lib
CPPUNIT_TEST_NAME="DesktopLOKTest::testPaintPartTile
DesktopLOKTest::testWriterCommentInsertCursor" VALGRIND=memcheck'
finishes with 'ERROR SUMMARY: 0 errors from 0 contexts'.

The problem is that in sw/sc/sd code it's enough to make sure that the
on-stack ViewCallback instances are destroyed after the loaded
component, but in desktop/ code also the emit-callbacks-on-idle code is
under test, so we need to make sure first the LOK document wrapper is
destroyed, and only after that the ViewCallback instances are destroyed.

Change-Id: Ie8361233461d00fd252da929fb912a1a0b835c30
Reviewed-on: https://gerrit.libreoffice.org/30072
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-10-20 08:25:02 +00:00
Miklos Vajna
b86b78e0ad Revert "CppunitTest_desktop_lib: add ModifiedStatus callback testcase"
This reverts commit cdf08b3aa74bb32ea18b583a9c0c41b91d7819ac. It breaks
'make -sr CppunitTest_desktop_lib
CPPUNIT_TEST_NAME="DesktopLOKTest::testPaintPartTile
DesktopLOKTest::testWriterCommentInsertCursor" VALGRIND=memcheck' (it is
terminated by SIGSEGV), and also it's the reason why sometimes the
lo_ubsan buildbot fails, see e.g.
<http://ci.libreoffice.org/job/lo_ubsan/329/console>.

This has to be re-introduced once I find a way to process all binding
updates at once without side-effects.

Conflicts:
	desktop/qa/desktop_lib/test_desktop_lib.cxx
	sfx2/source/control/bindings.cxx

Change-Id: Id6c49b9b31095ef1a1a8c1cd92cbae5deb316500
2016-10-19 19:06:16 +02:00
Miklos Vajna
0c34cd41c6 CppunitTest_desktop_lib: fix stack-use-after-return
The LOK callback objects registered are on-stack objects, so we must be
sure that references no longer used after we return.

Process idle events, so that desktop::CallbackHandler::flush() won't try
to use the reference after return.

Change-Id: I65d324cb9cef4fd1776d0f610d8d096717e0e833
Reviewed-on: https://gerrit.libreoffice.org/30034
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-10-19 09:22:52 +00:00
Miklos Vajna
d2081e8b61 CppunitTest_desktop_lib: fix loplugin:cppunitassertequals warnings
And also address a few new warnings in sal, plus silence such warnings
in salhelper till we can't print typeids out of the box.

Change-Id: I38049146710b6885f6a874bf74eedbc38b4d4651
Reviewed-on: https://gerrit.libreoffice.org/29809
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-10-14 08:59:32 +00:00
Miklos Vajna
d5263c2c56 LOK: conditionally include part number in invalidation payload
Since desktop/ code queues, compresses and only emits callbacks on idle,
it's possible that two invalidations are in the queue, and there was a
setPart() call between them. In this case it's impossible to tell what
part the invalidation was sent for.

Fix this by conditionally including the part number in the invalidation
payload. It's off by default, a new feature flag is added to request
this behavior.

gtktiledviewer enables this feature flag by default, though just to show
the part number in the debug output. Android doesn't enable it.

Change-Id: I73e6def848c0eb61d64e71026002c7a0e750aab4
2016-09-29 12:53:02 +02:00
Miklos Vajna
7fd1516ed3 sw lok: fix one view inserting a comment, other view jumping there as well
Views are expected to be more or less independent. So when one view
inserts a comment, don't emit cursor callbacks in the other views, so
that the other views don't jump to the comment position.

Change-Id: I5e4eadccef971dce2b7c759f3094f6d348d07645
2016-09-28 17:17:25 +02:00
Miklos Vajna
b9cc665360 sw lok: fix cursor position after inserting a comment
Make sure SwVisibleCursor::SetPosAndShow() doesn't emit LOK callbacks
till a comment window is active.

Need to invoke the unit test from desktop/, as the sw tests have the
status bar disabled.

Change-Id: Iab26024e9bb4da9c939bbd6cf769ec5c4dcb9a19
2016-09-26 14:20:11 +02:00
Miklos Vajna
dcc92a7cb5 sfx2: add SfxLokHelper::getViewIds
and also expose it in the LOK API. This way clients don't have to keep
track of what views they created / destroyed, they can also get an up to
date list with this method.

Change-Id: Ibaee42c545803e04a31e7c13ab6ec370b99465c4
2016-09-16 14:48:23 +02:00
Miklos Vajna
dc00592b4e lok::Document: rename getViews() to getViewsCount()
As this only returns the number of views, not the actual views. Since
it's a rename, it's just an API (but not an ABI) change.

Change-Id: Ib4f0ea56a90e5ae9c80ee1781aa2f29aff4259e7
2016-09-16 12:36:28 +02:00
Miklos Vajna
bee4ff508a desktop lok: avoid unnecessary setPart() in paintPartTile()
If possible, switch views, not parts, that way started Impress text
edits don't end as a side-effect.

Change-Id: I3f18d4dda6bc24235bf1219416f153248a867fa4
2016-09-14 19:47:48 +02: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
Miklos Vajna
3ab2b0625b sc lok: implement getCommandValues(.uno:AcceptTrackedChanges) API
Unlike in Writer, there doesn't seem to be an existing UNO API that can
be reused here.

Change-Id: I011a2f34d4d09ad604991637322ceadf6b2eb181
Reviewed-on: https://gerrit.libreoffice.org/28498
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-08-30 15:00:40 +00:00
Miklos Vajna
9e310a4705 sw redlines: expose description as part of the UNO/LOK API
A redline can have a manual comment and also an autogenerated
description, like "Insert 'abc'". Expose this later property as well, as
it provides useful additional information, especially when the comment
property is empty.

Change-Id: Id0f0ff62aef58d96b9b6071706c6f5b4a0d74800
2016-08-19 16:51:36 +02:00
Miklos Vajna
d890ec2f13 tdf#101592 sw: track changes state is doc-specific, not view-specific
So update the bindings of all views after changing it.

Change-Id: I5355f40ba27be521dcdf343b08305f3736979bbb
Reviewed-on: https://gerrit.libreoffice.org/28233
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-08-19 09:02:32 +00:00
Caolán McNamara
7a31ae2093 cppcheck: noExplicitConstructor
Change-Id: I61ab542f4cc777ecd8f8393c7bcbb681e529de5f
2016-08-18 14:24:11 +01:00
Caolán McNamara
4630157e29 cppcheck: passedByValue
Change-Id: I3ffcfe1294a1cbb06aadd3a1a79e9259876e38cc
2016-08-18 14:24:11 +01:00
Armin Le Grand
2a5ac6f634 screenshots: unify dumping of dialog test batch file
Change-Id: Ia1e79216d9537c65f8b7362778a2e1ad3ec6c2c2
2016-08-18 02:39:15 +02:00
Armin Le Grand
7a03c93bd6 screenshots: add dialog test cases for desktop
Only one dialog had to be disabled, some others look not
very useful

Change-Id: I2f8e786c0bb94259c5d03e7a72cc1d6ed9bbc066
2016-08-18 02:39:13 +02:00
Miklos Vajna
69fb6a3071 lok::Document::getCommandValues: expose redline info
Index is added as a property for each item, so that later changes can be
identified by the index when they are accepted/rejected.

Change-Id: I9362d208fdbed1f46d64558d44498d2b19150c81
2016-08-17 14:02:34 +02:00
Miklos Vajna
9dd8a0dcfd desktop: add undo/redo support to lok::Document::getCommandValues()
Expose the undo/redo stack and the metadata of each item.

Change-Id: I66b81e855a945c97be3d491ed709959f310d4b73
Reviewed-on: https://gerrit.libreoffice.org/27905
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-08-05 13:25:34 +00:00
Mike Kaganski
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
Stephan Bergmann
955c99d6eb clang-tidy performance-unnecessary-value-param in desktop
Change-Id: I1b1bf615c5afcb6e14929fde456c6b734be65414
2016-07-19 10:49:32 +02:00
Mike Kaganski
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
Stephan Bergmann
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
Miklos Vajna
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
Miklos Vajna
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
Miklos Vajna
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
Henry Castro
b2f994469f lok: reset the font list when there are no items
In the pre-init stage the devices were initialized with no
font list, but later the font list is updated. So those devices
were not updated.

Change-Id: I157d4c7079f9b1252916eb92b512aadb8e77329f
Reviewed-on: https://gerrit.libreoffice.org/25419
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-25 23:11:39 +00:00
Jakub Trzebiatowski
7eb86f3553 Inlucde TableStyles in GetStyles test
Change-Id: I8df7cb9baf2359c632bb2a23ed5f3e6eb0f6577c
Reviewed-on: https://gerrit.libreoffice.org/25058
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-05-18 08:57:04 +00:00
Ashod Nakashian
81d866a78d LOK: drop identical invalidation notifications
And drop duplicate GRAPHIC_SELECTION notifications.

(cherry picked from commit 7cdfe080432f69c2247cc7ff28316b653bd654ff)

Change-Id: I0c372efa9a58620e24cea219d82479cdc9dff359
Reviewed-on: https://gerrit.libreoffice.org/24771
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-09 13:58:30 +02:00