Commit Graph

423 Commits

Author SHA1 Message Date
5751291e8c LOK - Calc: changed the way header is updated on row/col insert/remove
This patch introduce a new LOK callback for informing the client that
the row/col header is no more valid and needs to be updated.

Change-Id: I21a3a41d69bd1a3c11c9ffaf1d7d53dbc3b9681d
Reviewed-on: https://gerrit.libreoffice.org/36733
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-04-21 15:35:22 +02:00
32f34f0d1b remove the remaining unused mouse cursors
which are not used by us directly or aliases of published awt constants

Change-Id: Ic4f009715d71a2f986b8ef8d64b4b2e64986bf3b
2017-04-14 10:27:04 +01:00
3c3f7d784e Removed duplicated includes
No automatic tools. Manual checked and tested.

Change-Id: Ife260fa4e1d786cf81f2917a901664cc54943754
Reviewed-on: https://gerrit.libreoffice.org/36371
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-13 07:46:16 +02:00
5676ced825 make UNO enums scoped for internal LO code
this modifies codemaker so that, for an UNO enum, we generate code
that effectively looks like:

   #ifdef LIBO_INTERNAL_ONLY && HAVE_CX11_CONSTEXPR
       enum class XXX {
           ONE = 1
       };
       constexpr auto ONE = XXX_ONE;
   #else
      ...the old normal way..
   #endif

which means that for LO internal code, the enums are scoped.

The "constexpr auto" trick acts like an alias so we don't have to
use scoped naming everywhere.

Change-Id: I3054ecb230e8666ce98b4a9cb87b384df5f64fb4
Reviewed-on: https://gerrit.libreoffice.org/34546
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-04 06:38:03 +00:00
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
1503769fe1 tdf#106325 - No way to create a new Document
This commit will add the ability to create a new document.
A FAB is used in home screen which on expansion gives
four options namely new writer document, new impress,
new Sheet or new Draw. Two new events loadNewDocument
and saveDocumentAs have been added.
Another major change includes the use of constraint layout
in LOUIActivity layout as it decreases nesting of views and
improves the app performance. This was needed because
of the new FAB layouts being added.
Support for vector drawables has been enabled.

Change-Id: Ia3ea17f73c0d8514f8ddb7b9a1cbd2ce7de6ac08
Reviewed-on: https://gerrit.libreoffice.org/35183
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-03-30 19:59:10 +00:00
b93201ffc6 Fix typos
Change-Id: I4b2eac5c999771b10e65fedebdab1d4ef435b367
Reviewed-on: https://gerrit.libreoffice.org/35626
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-25 16:52:53 +00:00
5fefac660a lok: Allow setting of the language during load.
Change-Id: I9dbb62950e639376c26122ceb9fcec2982b3ca82
2017-03-24 19:01:53 +01:00
ad5bf6b72c vcl: clean up ANDROID ifdefs in pdfwriter_impl
HAVE_FEATURE_NSS is already 0 on Android, so an "&& !defined(ANDROID)"
is redundant.

Change-Id: I275ed71d9ebdb56878d980a23c4480e41b28bd6b
Reviewed-on: https://gerrit.libreoffice.org/35614
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-24 08:12:52 +00:00
7916487cf4 convert ViewShellId to o3tl::strong_int
Change-Id: I45553d11d56aa8c4432aec126ca51f24bd3ead09
Reviewed-on: https://gerrit.libreoffice.org/35421
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-24 06:14:17 +00:00
d06dfe25d5 desktop: remove redundant virtual keywords in lokclipboard
Change-Id: I0b83a79e143180901ce2ae4ef02ff8b65cfb0694
Reviewed-on: https://gerrit.libreoffice.org/35529
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-22 11:26:15 +00:00
89f5bb3cbb lok: Fix crash in paintPartTile() when the current view was destroyed.
Change-Id: I59b71ee6815cbcfa4c8b5f68ae6dc9299856d49e
Reviewed-on: https://gerrit.libreoffice.org/35494
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-03-21 10:51:58 +00:00
3d67719eda lok: It's not that important to skip some of the messages.
More important is always to perform the paint.

Change-Id: I392dd6cea4a5f43a646fca04d284b365b5fb5b78
2017-03-17 12:34:41 +01:00
e6cca48bc9 lok: Do not use UNO for fetching tracked changes
See inline comment for reasons.

Also, move the SwRedlineTypeToOUString function as inline to same header
file containing redline types.

Change-Id: I9b4be4f104c095b2ccd8287d935347c81fd25974
Reviewed-on: https://gerrit.libreoffice.org/34950
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: pranavk <pranavk@collabora.co.uk>
2017-03-08 06:44:57 +00:00
91745bdbfa Simplify SAL_INFO message composition
Change-Id: I665c77f984cebba8803ff81a78dd31578bdeef51
2017-03-06 14:56:09 +01:00
f1ea8c43a8 LOKit runMacro: show also the error code
Change-Id: I6ac2b274e25046f90910e3fb03b10e1052187e2f
Reviewed-on: https://gerrit.libreoffice.org/34815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-03-03 11:58:53 +00:00
67dad2676d lok: Listen to change tracking related commands
Change-Id: Ieafd31342b356d7e95e4321cc49580b57f32e5be
2017-03-03 16:45:00 +05:30
2e0db91d90 Fix typos
Change-Id: I6b547a864e7a8c8eeedcd7f7c56796e2b3a606d1
Reviewed-on: https://gerrit.libreoffice.org/34807
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03 07:06:52 +00:00
d3981b3e8c Keep the order that is in the header.
Change-Id: I6171668b91e13cbcddf223645333e435cf08cb2a
2017-02-28 11:14:53 +01:00
e7729f4584 Run macro:// via LOKit
Change-Id: I54d3c734d86d4b44e1dfe1ad7728e2f51cd26d53
Reviewed-on: https://gerrit.libreoffice.org/34538
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-02-28 09:50:11 +00:00
fa48d00ddb loplugin:subtlezeroinit: desktop
Change-Id: I23ffaa7e5f138f877832ad3afe591980aada6578
2017-02-21 07:35:08 +01:00
866582435f lok: listen for DeleteAnnotation state changes
Change-Id: I2ea0d237cbbfd912b012ed400a328bfb6546cdfb
2017-02-20 14:09:13 +05:30
2562ad74d1 stoi not a member of std under android toolchain
Change-Id: I73a4e7894e33dd95ca50ea25f5f95bf94a43531e
2017-02-01 10:22:17 +00:00
20910ea89e Replace a terribly expensive json parsing with a peek for the value.
We should reduce the amount of callbacks from the core in the first place, so
that we don't have to deduplicate this much here, but this already helps a
lot.

Change-Id: Idf4a3681ac0f47536e00c1d97152f3f8bb99894b
2017-01-31 17:47:10 +01:00
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
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
6e463381b4 lok: Allow to reply to comments using postit id
Change-Id: Ic6aaa3066923d62f197bc2b0e02e8049c9d7cd2c
Reviewed-on: https://gerrit.libreoffice.org/33612
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-01-27 12:54:27 +00:00
a623b3a449 lok: New commandvalues command - .uno:ViewAnnotations
Change-Id: I1c3560ab4609c64da7a77e9a65febeb569ec1a3c
Reviewed-on: https://gerrit.libreoffice.org/33468
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-01-27 11:49:01 +00:00
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
75d8b305bb lok: New feature flag to turn off tiled annotations
Change-Id: Ie418642242ada98d4a41f30bb6cefcd57f398ef0
Reviewed-on: https://gerrit.libreoffice.org/33472
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-01-23 19:32:03 +00:00
a27e090795 lok: Listen for state change events for cell alignment commands
We used to use HorizontalAlignment uno command for cell alignment
both in online and gtktiledviewer. To make things simpler, lets
use separate cell alignment uno commands for spreadsheets like we
have in writer and impres.

Change-Id: I2a959d1892f6b02db7a9ce51d55309216e4b3c6c
Reviewed-on: https://gerrit.libreoffice.org/33444
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-01-23 06:47:34 +00:00
1c27286b9d Lok: support for batch API calls
Mouse and keyboard operations typically
come in batches, and often each results in
tile invalidations and/or layout modifications.

Processing each input event on its own, then processing
the resulting output event is very costly and unecessary
when we know there is more of the same.

The new API adds support for batching such related
input events by disabling the output events generated
by Core until the batch is done. The client can
then process the resulting events, which will
be compressed and deduplicated.

Change-Id: Id381dab807186d010021a8778ee440074a739920
Reviewed-on: https://gerrit.libreoffice.org/33402
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-23 03:23:19 +00:00
fdc612619c Refactor Scheduler to add Task class
Moves all the "task-specific" stuff into a Task class and just
keeps the "real" static Scheduler functions in the original
Scheduler class.

Change-Id: I9eb02d46e2bcf1abb06af5bab1fa0ee734d1984c
2017-01-17 16:08:47 +01:00
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
a207bb515e -Werror,-Wunused-lambda-capture
Change-Id: Idb3c9673d8c20782ff2d7995aad30ed9253b5337
2017-01-14 18:33:59 +01:00
8885343a33 Fix inefficient usage of string::find() in condition (CWE597)
string::compare() will be faster when string::find's result is
compared with 0, because it will not scan the whole string.

Change-Id: I78596a6d796fe9779f88b7c7b91da09aa27b7035
Reviewed-on: https://gerrit.libreoffice.org/32430
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-01-02 10:39:04 +00:00
c5ceb0134d lok: Fix state feedback for ToggleMergeCells
Now it broadcasts "disabled" to disable the command and
true/false to tell the status of the command which automatically
means "enabled"

Change-Id: I3314da77fb2b84d97f64b9832d65791b84fcd7df
Reviewed-on: https://gerrit.libreoffice.org/32086
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-16 15:07:31 +00:00
828e77009b lokit: support password protected binary MS and OOXML documents
Change-Id: Id7fa1f428d07271e71f3df962bd6718a35372389
Reviewed-on: https://gerrit.libreoffice.org/31730
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2016-12-08 10:04:08 +00:00
96918103a0 Revert "lok: in preinit stage, do not force locale"
Fixes unit-prefork in online for me.

Kendy suggested to also change the forced locale to en-US.UTF-8
instead of just en-US, but that caused:
warn:i18nlangtag:32416:1:i18nlangtag/source/languagetag/languagetag.cxx:1369:
LanguageTagImpl::convertLocaleToLang: with bAllowOnTheFlyID invalid
'en-US.UTF-8'.

This reverts commit c3d25b8b74867b5b8419d09f6e362aa6c8eae34f.

Change-Id: I2cd8c50a783918c380505e7a3aaf37d578e76031
Reviewed-on: https://gerrit.libreoffice.org/31489
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2016-12-05 09:47:25 +02:00
2a5d8d7306 Lok: better logging and warnings
Change-Id: Ia933ae65197893592eeb04cb8a1a617a931ad623
Reviewed-on: https://gerrit.libreoffice.org/31606
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-05 04:07:06 +00:00
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
b18b1e80e9 sw: use auto when initializing with a cast to avoid duplicating the type name
Change-Id: Ide7bd0f1f444824b78aa53cfe1db0129cbca1a5d
Reviewed-on: https://gerrit.libreoffice.org/31397
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-11-30 10:43:43 +00:00
098fb95772 lok: ensure positive values for width and height
also check the pointer memory block allocated

Change-Id: I0ded04e06f80400e64c5e58126a32ee503aeb394
Reviewed-on: https://gerrit.libreoffice.org/31388
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2016-11-30 00:09:58 +00:00
2db42ab241 sw lok: notify repair when exist a conflict of multiple users undo/redo
Change-Id: I026f4df6239fa87ee191f92127f9fa98ac2993eb
Reviewed-on: https://gerrit.libreoffice.org/31161
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2016-11-28 02:26:23 +00:00
e2d5f1ba3f lok: avoid render font with empty rectangle
Change-Id: I58e24e0de37144ae5d67857b243e6a7091f2b77a
Reviewed-on: https://gerrit.libreoffice.org/31281
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2016-11-28 02:00:56 +00:00
af18b7d60f lok: in preinit stage, do not force locale
force locale load some fonts before the lokit process
is jail rooted, so it causes invalid rendering special
characters in doc_renderFont function

Change-Id: I25f00e5bb947753b820c6966a99a6c3849413315
Reviewed-on: https://gerrit.libreoffice.org/31280
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2016-11-28 01:14:04 +00:00
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
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
e1b2af1932 that should have been LibreOfficeKit*Document*Class
Change-Id: I48f9db39be18ae9a456002de8f40fbb0fb3be707
2016-11-17 16:38:30 +01:00
121a202076 tdf#92346 - Copy functionality in the viewer
Reference class added to
desktop/source/lib/lokandroid.cxx
for Java_org_libreoffice_kit_Document_getTextSelection()

Change-Id: I211d5709df39fd9fafdab9232af760613f6b86c0
Reviewed-on: https://gerrit.libreoffice.org/29804
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-11-16 06:16:17 +00:00