Commit Graph
2688 Commits
Author SHA1 Message Date
Noel Grandin e32c56855b use boost::optional in sc and svgio
instead of using std:unique_ptr to allocate small objects on the heap

Change-Id: Ifd309a9bf331910354406b827b89a0363f3b7eda
Reviewed-on: https://gerrit.libreoffice.org/51945
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-28 08:39:35 +02:00
Noel Grandin b2e8bbeafa loplugin:useuniqueptr in ScColumn
Change-Id: Iff6c68a29b9e7660132cbe4e556802b0f63706f0
Reviewed-on: https://gerrit.libreoffice.org/51904
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-28 08:39:21 +02:00
Noel Grandin b7654432bf loplugin:useuniqueptr in ScDocument
and fix bug where we were deleting a pointer to an object
we did not own via pFormatExchangeList

Change-Id: I488c679734c48bd21bc6be04837e037e97550647
Reviewed-on: https://gerrit.libreoffice.org/51668
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-22 09:53:45 +01:00
Caolán McNamara 4b785097f1 drop unnecessary includes
Change-Id: I1a817d5575bbd57ecaa874a27158b9218e4210cc
Reviewed-on: https://gerrit.libreoffice.org/51603
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-20 13:08:20 +01:00
Caolán McNamara a80d9d61b8 coverity#1430075 Dereference after null check
Change-Id: Id4c9cc1463ba8b38a7b115d574fec8c9b1d55384
Reviewed-on: https://gerrit.libreoffice.org/51556
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-19 16:59:13 +01:00
Noel Grandin a3aceef820 don't use heap for elements in ScRangePairList
no need to store small objects like this out of line.

And use std::array for ScRangePair, so we get range checking in debug
mode.

Change-Id: Ie4690edbb4c3fdc4e08206cb016b8167a399d95a
Reviewed-on: https://gerrit.libreoffice.org/51268
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-15 07:30:26 +01:00
Eike Rathke adc6ba2ad5 Rename ScMatrix::IsString() to IsStringOrEmpty()
... to prevent further confusion what it acually returns.
Follow-up inspection of places where used might be necessary, and
whether an IsEmpty() is used and necessary or an IsAnyEmpty() or
some such would be needed.

Change-Id: I7975a97f0d16442cf195956d148bfb7fbdf89c6a
Reviewed-on: https://gerrit.libreoffice.org/51055
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-10 22:58:40 +01:00
Noel Grandin 6529cd54c2 don't use heap for elements in ScRangeList
no need to store small objects like this out of line.

Also
 - add move constructor and move assignment operator
 - drop Assign method since it now has the same
   signature as push_back

Change-Id: I9a8647d3a11f24166a83d399a358a2bce3b2cb79
Reviewed-on: https://gerrit.libreoffice.org/50899
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
2018-03-10 19:22:01 +01:00
Tomaž Vajngerl 1dc39d3680 remove references to {Header,Footer,Para}GraphicURL
Change-Id: I559f25ee99f7b8b49545390479cbb06d3c601d3c
Reviewed-on: https://gerrit.libreoffice.org/50982
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-10 02:11:43 +01:00
Tomaž Vajngerl c7ff07b2da remove MID_GRAPHIC_URL and related mappings, implementation
Change-Id: I752a2f036791720d12fb04b95f53d4127d605c7e
Reviewed-on: https://gerrit.libreoffice.org/50979
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-09 09:41:44 +01:00
Noel Grandin 2d40c43e86 loplugin:redundantfcast look for unnecessary temporaries
when calling methods that take a const&

Change-Id: Idf45dfd9fea0de6fae0b1f89550f2f7fc302aa15
Reviewed-on: https://gerrit.libreoffice.org/50970
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-09 07:14:51 +01:00
Noel Grandin 9d1f56903b use more Color in sc
Change-Id: Ifdd53fa0eed8cec7878d0f5b9eea1e2c826e3ae5
Reviewed-on: https://gerrit.libreoffice.org/50819
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-07 07:11:24 +01:00
Andrea Gelmini 240e67e37e Fix typos
Change-Id: I005023337dbe593e0ac1d76f7b10848d24f314a5
Reviewed-on: https://gerrit.libreoffice.org/50785
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-03-06 09:42:04 +01:00
Tomaž Vajngerl d64ce64327 sc: add props. BackGraphic as replacement for BackGraphicURL
...and also add and adjust in the report designer

Change-Id: I5593f4d0bf9daf94f7d521f9c195e27a98282b2b
Reviewed-on: https://gerrit.libreoffice.org/50537
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-01 02:51:28 +01:00
Johnny_M b6aee26f36 Translate German comments and debug strings
Change-Id: Ie2da785cb674e21f042caa5e6d461e3489036003
Reviewed-on: https://gerrit.libreoffice.org/50467
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2018-02-28 10:51:36 +01:00
Noel Grandin e2cb154195 convert COL_ constants to be of type Color
Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48
Reviewed-on: https://gerrit.libreoffice.org/50373
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-28 07:34:27 +01:00
Pranav Kant 3c3e07b51f lok: All mouse,key events async
custom posting of mouse,key events on main thread

This still bypasses vcl while keeping the processing of events on the
main thread which is what we want.

Change-Id: Ia7a6f5ef1ac546245715abe418d261b49df12d4c
Reviewed-on: https://gerrit.libreoffice.org/50274
Reviewed-by: Aron Budea <aron.budea@collabora.com>
Tested-by: Aron Budea <aron.budea@collabora.com>
2018-02-27 19:43:52 +05:30
Pranav Kant 33acd92561 lok sc: This is not needed now
I guess since these events are routed through vcl now.

Change-Id: Ib2a44c82d76a25ac5a3341c060a665c62e3d60a7
Reviewed-on: https://gerrit.libreoffice.org/50254
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-02-27 19:43:45 +05:30
Pranav Kant f48c0d0999 lok sc: Post mouse events to main thread
Change-Id: I1311938d7c01d0e3bfd239743e6cb2148da56cdf
Reviewed-on: https://gerrit.libreoffice.org/50253
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-02-27 19:43:37 +05:30
Pranav Kant fa80f03899 lokdialog sc: post key events to the main thread
This also fixes the problem when some dialog is executed inside the key
handler.

Change-Id: I831ed4b886c1a5eac13dffd8e881a07045458e44
Reviewed-on: https://gerrit.libreoffice.org/50244
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-02-27 19:43:32 +05:30
Jochen Nitschke 35fc452721 remove unused vclunohelper.hxx includes
Change-Id: I68178379e5493d0e738861a4dce5aa6e4b58cd22
Reviewed-on: https://gerrit.libreoffice.org/50393
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-27 15:00:06 +01:00
Noel Grandin 08ab1f46b1 loplugin:oncevar extend to tools/gen.hxx types
Change-Id: I5c75875da44334569c02e2ff039b33c38397a0a2
Reviewed-on: https://gerrit.libreoffice.org/50283
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-26 07:21:04 +01:00
Pranav Kant 190a44fe05 lok: Factor out the code for finding vcl::Window of a document
This should also help with IME input on charts

Change-Id: Ie513790a5d0c87397c39301a328a44b59d394a45
Reviewed-on: https://gerrit.libreoffice.org/50091
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: pranavk <pranavk@collabora.co.uk>
2018-02-23 08:43:31 +01:00
Noel Grandin 8e72262339 ColorData->Color in sc
and fix the sal_Int32() conversion operator in Color, which was
always returning 0

Change-Id: I0aefaedc34ee0a8bccd43238ccfe8196d2dd5c5c
Reviewed-on: https://gerrit.libreoffice.org/50051
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-22 07:22:13 +01:00
Noel Grandin 19a906f096 drop Color::SetColor(ColorData) in favour of operator=
first stage of getting rid of ColorData

Change-Id: I5e4e95eb958722814c43c8d1ebfef17ad18c29ec
Reviewed-on: https://gerrit.libreoffice.org/49997
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-20 07:19:16 +01:00
Eike Rathke 121fda77b0 Resolves: tdf#115710 let css::sheet::FunctionAccess execute WEBSERVICE
... independent of a LinkManager that is not present in the
interim FunctionAccess document. FunctionAccess is executed by
extensions, Add-Ons and macros that the user gave permission
already.

Change-Id: I9349a59ee24089c3657de7786b49e5e81946f175
2018-02-19 23:53:51 +01:00
Noel Grandin e2e4798b35 Revert "loplugin:changetoolsgen in sc" and reapply plugin
because I
(a) forgot to insert parentheses which changes the meaning of some expressions and
(b) I now use the AdjustFoo calls when changing unary operations, which reads much better
This reverts commit 95fab7cbf2.

Change-Id: Icbdcc0f4227d88812be12e18ba6961088db80c3e
Reviewed-on: https://gerrit.libreoffice.org/49840
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-17 07:07:58 +01:00
Pranav Kant 712540224d lok IME: support dialogs as well
Change-Id: Ic78da45dadaa5a4e1ca78e20d04974108581121e
Reviewed-on: https://gerrit.libreoffice.org/49714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: pranavk <pranavk@collabora.co.uk>
2018-02-14 19:19:37 +01:00
Noel Grandin 95fab7cbf2 loplugin:changetoolsgen in sc
Change-Id: Ic24332cac65e665b55b9e1bbaf09ee56066875fd
Reviewed-on: https://gerrit.libreoffice.org/49703
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-14 14:17:53 +01:00
Andrea Gelmini 5bf91d3051 Fix typos
Change-Id: I141de4716df406f2cbcbc77e454dbadf0fb8c164
Reviewed-on: https://gerrit.libreoffice.org/49586
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-12 15:36:05 +01:00
Pranav Kant b746577d27 sd, sc lok: IME support + unit tests
Change-Id: I710ba4347977641102b89fd274a159d34bc29e72
Reviewed-on: https://gerrit.libreoffice.org/49385
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: pranavk <pranavk@collabora.co.uk>
2018-02-08 09:44:51 +01:00
Noel Grandin e3308af401 TypedWhichId in sc
Change-Id: I43558191f65bfb07abfbc92970629d5dd561a04e
Reviewed-on: https://gerrit.libreoffice.org/49141
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-03 16:04:17 +01:00
Jens Carl 9427ab79de Use new property FormulaResultType2 to determinate ...
what result to return if the cell content type is formula.
Cleans up the confusion which was introduced with commit
8a73799d12.

Change-Id: Ie4346173abf6bc3732d2fec06341f4e32cf68b82
Reviewed-on: https://gerrit.libreoffice.org/48725
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
2018-01-30 13:16:20 +01:00
Eike Rathke 09b81a42c2 coverity#1428611 check for nullptr
Change-Id: I4d0bd765e4c1677448dcd3a74f26f36394c4a358
2018-01-26 14:03:54 +01:00
Jens Carl 8a73799d12 Change property value to get CellContentType in sc/
Change the name of property value to get the CellContentType and
rename variables to reflect change of the meaning. Follow up from
commit cceaece18a.

Change-Id: I35c58174cef8ab44bd37b37fd18876ef912e16be
Reviewed-on: https://gerrit.libreoffice.org/48476
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-25 23:29:55 +01:00
Andrea Gelmini f08828f26b Fix typos
Change-Id: I18d224557173b9ae5f20399b05132f45f08022a4
Reviewed-on: https://gerrit.libreoffice.org/48544
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-25 08:36:58 +01:00
Jens Carl cceaece18a offapi: Add properties FormulaResultType2 and CellContentType
Add two new properties to SheetCell.idl "FormulaResultType2" and
"CellContentType", because the "FormulaResultType" is returning the
wrong value (com::sun::star::table::CellContentType instead of
com::sun::star::sheet::FormulaResult). Also documeted the curiosity.

Change-Id: Icc6538e155ba27fb9d097d8790ac9b4b230c1446
Reviewed-on: https://gerrit.libreoffice.org/48367
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-23 19:04:52 +01:00
Vasily Melenchuk c18d183c9f tdf#113572: removed redundant calc service
calc service introduced previously in commit
0074951704 is not required, interface
is enough for feature implementation.

Change-Id: I9cf30f2201619465da9061c7ef1e574209062cf9
Reviewed-on: https://gerrit.libreoffice.org/47960
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-21 19:22:25 +01:00
Stephan Bergmann 022588bf20 Include android/compatibility.hxx from ubiquitous sal/config.h
...instead of having to add it to more and more individual .cxx files, as the
need arises.

Change-Id: If1e893c79abf1c1bb7fb7b89dcb9bd423a7f1b94
Reviewed-on: https://gerrit.libreoffice.org/48108
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-18 23:08:20 +01:00
Stephan Bergmann c407574416 Fix Android build (missing std::trunc)
...after 110025afab "Odd conversion double ->
sal_Int32 -> double"

Change-Id: Iaff78e2046261290f8c4ae8bdfcbf1edc5963d87
2018-01-18 08:46:29 +01:00
Stephan Bergmann 110025afab Odd conversion double -> sal_Int32 -> double
...which had been introduced into that assignment in
ScDataPilotFieldObj::createDateGroup with
7dd50f9ec1 "CWS-TOOLING: integrate CWS dr67", but
for no documented purpose.  So lets assume the truncation is for a reason, and
replace it with a call to std::trunc.

Change-Id: I2dfd4c0f5966e9ab294ecd5b3424fece2ea70daa
Reviewed-on: https://gerrit.libreoffice.org/47995
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2018-01-18 04:30:41 +01:00
Jens Carl 4ea231ccde Add ServiceProvider "com.sun.star.sheet.GlobalSheetSettings"
Change-Id: I31a93cd6a7b46f1746aee694668295fabe4fa8fd
Reviewed-on: https://gerrit.libreoffice.org/47926
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-16 11:23:53 +01:00
Andrea Gelmini a6b69a9384 Fix typo
Change-Id: I51c97356c9c2939f2d94d6388c829a179ca00daa
Reviewed-on: https://gerrit.libreoffice.org/47853
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-15 13:53:21 +01:00
Stephan Bergmann 8392231791 More loplugin:cstylecast: sc
Change-Id: Iaaa5b99cdff49bc1e88443ee23d98c005ff84911
2018-01-15 09:03:41 +01:00
Stephan Bergmann 7dd588423c Use = for initialization
...so that an automatic loplugin:cstylecast rewrite (with a to-be-committed
enhanced loplugin) won't rewrite that to illegal and -Werror,-Wvexing-parse

  uno::Sequence<OUString> aNames(int(ScSheetEventId::COUNT));

Change-Id: I6bb0d7de8d382ad71b1510ce4a604d732899ccee
Reviewed-on: https://gerrit.libreoffice.org/47866
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-15 08:47:30 +01:00
Stephan Bergmann 681783c9ad More loplugin:cstylecast: sc
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: I987ac3a6d062600a5e21c3462c70595dfaa51796
2018-01-12 20:17:13 +01:00
Vasily Melenchuk 0074951704 tdf#113572: allow switching to data range in copypasted chart
- enable data range toolbar button for charts with internal
  data table and possiblilty to switch to data range
- show warning before destoying data table
- recreation of data provider

Change-Id: I2a08b723be80d411e970bfe2ee53dee7d3d52faa
Reviewed-on: https://gerrit.libreoffice.org/44605
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-10 01:24:06 +01:00
Jens Carl b0ab92eaa7 Add ServiceProvider "com.sun.star.sheet.TableAutoFormats"
Change-Id: If058d47116e0a287fc5b2155f5ae6b36cbd8fa47
Reviewed-on: https://gerrit.libreoffice.org/47359
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-04 06:38:14 +01:00
Noel Grandin 4b27e96cb0 loplugin:passstuffbyref improved return in sc
Change-Id: I487cfe96e9fe65f9be39b2488880410bc7b4baea
Reviewed-on: https://gerrit.libreoffice.org/47228
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-01 19:05:18 +01:00
Katarina Behrens 785a8564eb tdf#79077: Load/save PapersizeFromSetup into ODF for sw and sc
Change-Id: I0fc1a771927dc7116768cfbb7f7e31006e41e1c8
Reviewed-on: https://gerrit.libreoffice.org/45332
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-12-21 10:46:39 +01:00