Commit Graph

34404 Commits

Author SHA1 Message Date
Caolán McNamara
0a616e7e6c cid#1456145 Missing move assignment operator
Change-Id: I638278ff61499206f479cba18448c8fa5a5c28a8
Reviewed-on: https://gerrit.libreoffice.org/84203
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-12-02 17:31:15 +01:00
Mike Kaganski
68a8467723 tdf#129141: paint all when in multiline mode
... otherwise it assumes that only part of first string to the right of the
unchanged string part needs redrawing (which would be to the right of the
control itself)

Change-Id: I2833c1eb2026041b11d0b72431b164d2ee3befef
Reviewed-on: https://gerrit.libreoffice.org/84207
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-12-02 14:04:08 +01:00
Caolán McNamara
ae63347262 use initializer list
Change-Id: Ida6d710ceb4722029c9d0e07df47e621dd4a4053
Reviewed-on: https://gerrit.libreoffice.org/84192
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-12-02 11:31:27 +01:00
Caolán McNamara
ea2aeb6917 use weld::WaitObject
Change-Id: Ib2ad0f0fe17c4db66693ef91e3cdbc8511eb8314
Reviewed-on: https://gerrit.libreoffice.org/84166
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-12-02 09:52:29 +01:00
Julien Nabet
3471d83f49 Use initializer list instead of using several inserts (sc/vba)
Change-Id: I41c5c7c5e6c6298c8fe1e7b7a13f4ee8a1f12ec8
Reviewed-on: https://gerrit.libreoffice.org/84172
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-12-01 23:18:14 +01:00
Stephan Bergmann
7e403195e5 Introduce o3tl::optional as an alias for std::optional
...with a boost::optional fallback for Xcode < 10 (as std::optional is only
available starting with Xcode 10 according to
<https://en.cppreference.com/w/cpp/compiler_support>, and our baseline for iOS
and macOS is still Xcode 9.3 according to README.md).  And mechanically rewrite
all code to use o3tl::optional instead of boost::optional.

One immediate benefit is that disabling -Wmaybe-uninitialized for GCC as per
fed7c3deb3 "Slience bogus
-Werror=maybe-uninitialized" should no longer be necessary (and whose check
happened to no longer trigger for GCC 10 trunk, even though that compiler would
still emit bogus -Wmaybe-uninitialized for uses of boost::optional under
--enable-optimized, which made me ponder whether this switch from
boost::optional to std::optional would be a useful thing to do; I keep that
configure.ac check for now, though, and will only remove it in a follow up
commit).

Another longer-term benefit is that the code is now already in good shape for an
eventual switch to std::optional (a switch we would have done anyway once we no
longer need to support Xcode < 10).

Only desktop/qa/desktop_lib/test_desktop_lib.cxx heavily uses
boost::property_tree::ptree::get_child_optional returning boost::optional, so
let it keep using boost::optional for now.

After a number of preceding commits have paved the way for this change, this
commit is completely mechanical, done with

> git ls-files -z | grep -vz -e '^bin/find-unneeded-includes$' -e '^configure.ac$' -e '^desktop/qa/desktop_lib/test_desktop_lib.cxx$' -e '^dictionaries$' -e '^external/' -e '^helpcontent2$' -e '^include/IwyuFilter_include.yaml$' -e '^sc/IwyuFilter_sc.yaml$' -e '^solenv/gdb/boost/optional.py$' -e '^solenv/vs/LibreOffice.natvis$' -e '^translations$' -e '\.svg$' | xargs -0 sed -i -E -e 's|\<boost(/optional)?/optional\.hpp\>|o3tl/optional.hxx|g' -e 's/\<boost(\s*)::(\s*)(make_)?optional\>/o3tl\1::\2\3optional/g' -e 's/\<boost(\s*)::(\s*)none\>/o3tl\1::\2nullopt/g'

(before committing include/o3tl/optional.hxx, and relying on some GNU features).
It excludes some files where mention of boost::optional et al should apparently
not be changed (and the sub-repo directory stubs).  It turned out that all uses
of boost::none across the code base were in combination with boost::optional, so
had all to be rewritten as o3tl::nullopt.

Change-Id: Ibfd9f4b3d5a8aee6e6eed310b988c4e5ffd8b11b
Reviewed-on: https://gerrit.libreoffice.org/84128
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-01 14:57:16 +01:00
Stephan Bergmann
32b4936c99 Don't use boost::optional forward declarations
...in preparation for wholesale replacement of boost::optional with
o3tl::optional (which will be a using declaration for either std::optional or
boost::optional, hence can't be forward-declared easily)

Change-Id: I031ed1812a0c939f37253f7753e358f1ad9153a3
Reviewed-on: https://gerrit.libreoffice.org/84126
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-01 13:58:41 +01:00
Stephan Bergmann
47dd2c63f6 Rewrite uses of boost::optional
...to only use functions that are also available for std::optional (in
preparation for changing from boost::optional to std::optional):

* uses of get are replaced with operator * or operator ->
* uses of is_initialized are replaced with operator bool
* uses of reset with an argument are replace with operator =

(All of the replacements are also available for boost::optional "since forever",
so this change should not break builds against old --with-system-boost.  An
alternative replacement for is_initialized would have been has_value, but that
is only available since Boost 1.68.)

Change-Id: I532687b6a5ee37dab28befb8e0eb05c22cbecf0f
Reviewed-on: https://gerrit.libreoffice.org/84124
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-30 17:44:34 +01:00
Mike Kaganski
b48bcb45d7 Clarify the comment
Change-Id: I610057d4226616cad928eba82ce0055b37fe4e16
Reviewed-on: https://gerrit.libreoffice.org/84102
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-11-30 11:31:56 +01:00
Mike Kaganski
d997addd50 tdf#129007: fix autocompletion
Using EditView::SelectCurrentWord in arbitrary selection positions
is not a correct approach. When cursor is after "_" in "=_+FUNC",
the method will select "=_+", i.e. the substring that cannot start
any Calc identifier (and actually ending *after* current cursor).
When matching identifiers like "bb.bbb" in "=bb.bb", the end result
will be "=bb.bb.bbb", etc.

So instead of trying to match words and hack around problems, let's
simply find longest match in the string starting from beginning of
the line, and ending at current cursor position. Testing trailing
parts of that string of decreasing length, the first found match is
the longest, which is what we need. This also avoids multiple calls
to expensive EditEngine methods.

Change-Id: Ia3470cc85a4ba9f9ab34cbe9db3250bf28e93350
Reviewed-on: https://gerrit.libreoffice.org/84087
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-11-29 21:20:56 +01:00
Caolán McNamara
5030be4e85 Related: tdf#129082 set explicit parent for warning dialog
Change-Id: I600be635fef3f9c0d60a799af210e2c6b11b7c10
Reviewed-on: https://gerrit.libreoffice.org/84014
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-28 20:13:00 +01:00
Noel Grandin
c71d886120 fix a few places using SCROW/SCCOL datatypes incorrectly
Found while looking for problems in another patch.

This will become more important with "jumbo sheets" when using the wrong
datatype can mean overflow

Change-Id: I7370ffd8a6edc33a5e613242735e4c7b9eaf830d
Reviewed-on: https://gerrit.libreoffice.org/83991
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-28 19:02:06 +01:00
Noel Grandin
523189a32e merge LOTUS_ROOT into LotusContext
since they are serving the same purpose.
In the process getting rid of a duplicate ScDocument*
that was sometimes set and sometimes not, causing trouble
for me in another patch

Change-Id: I2ceeb6d6e34b62616065bf4840a87bd87d2c3844
Reviewed-on: https://gerrit.libreoffice.org/83990
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-28 19:01:54 +01:00
Szymon Kłos
ae9e1569e7 jsdialogs: share the commands updates sending code
Change-Id: I34c1e03a8f92efe0c0dd391d16ff907919e65b00
Reviewed-on: https://gerrit.libreoffice.org/83748
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
(cherry picked from commit 880ff26edff0f7dfdd0d5b74fd9d7026fd2d8523)
Reviewed-on: https://gerrit.libreoffice.org/83954
Tested-by: Jenkins
2019-11-28 08:34:20 +01:00
Szymon Kłos
dcb31718a2 jsdialogs: dumpAsJSON for SfxItems with FillGradient example
Change-Id: I1b9303af6f52ad071074200bb630c587c8f611c1
Reviewed-on: https://gerrit.libreoffice.org/83875
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2019-11-27 20:31:07 +01:00
Noel Grandin
1c8b8e97eb sc: rowcol: tdf#50916 add UI to turn jumbo sheets on
Change-Id: I9e50c38f38acdf5a275b125e9e421a6c6af6d590
Reviewed-on: https://gerrit.libreoffice.org/83661
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-27 13:10:45 +01:00
Szymon Kłos
aa5b9c86e2 jsdialogs: send .uno:FillStyle updates in Calc
Change-Id: I51682546a3c8fd4ee6d97cf8bf79d066e571addf
Reviewed-on: https://gerrit.libreoffice.org/83386
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/83780
Tested-by: Jenkins
2019-11-27 09:21:31 +01:00
Stephan Bergmann
8d23959b9e Remove unused return_type template
unused since 1c2405ba44 "tdf#89387 General functor
and basic operations"

(found by upcoming loplugin:unusedmember, which identified each of the two
explicit specializations' sole member as unused)

Change-Id: I275137cc70cbe4e58a728779e7e7593c5e11224b
Reviewed-on: https://gerrit.libreoffice.org/83836
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-27 08:58:28 +01:00
Michael Stahl
508dce40f8 xmloff,sw: fix handling of invalid attribute with multiple ':'
ooo53770-1.odt contains an invalid attribute
style:style:use-optimal-row-height, which was round-tripped as an
unknown attribute, triggering the assert in CheckValidName().

This reveals a confusing mess of SvXMLNamespaceMap::GetKeyByAttrName
functions.

The bCache flag for one of them was accidentally inverted in commit
78f0d15893 "loplugin:constantparam in xmloff/"

There are basically 2 use cases for this:
* XML element and attribute names, which are XML QName and contain at
  most 1 ':'
* XML attribute values, which are namespace-prefixed and may contain
  any number of ':' in the "local" part of the value

Because caching is explicitly disabled for Calc formulas, just resolve
the inconsistent bCache by always caching element and attribute names,
and never caching attribute values, so we need just 1 flag.

Change-Id: I363ea2229d0bf5c7199d61b0fee0d9f168911bfa
Reviewed-on: https://gerrit.libreoffice.org/83619
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-26 21:49:01 +01:00
Marco Cecchetti
fa42338091 lok: calc formula bar tunneling: function list callback
Added a lok callback for sending the list of functions matching the
current characters typed by the user.

Change-Id: Ia971fc55ec5eb961b4098592a8049dd0eed3ba14
Reviewed-on: https://gerrit.libreoffice.org/83750
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-26 16:26:28 +01:00
Stephan Bergmann
ae71a0adef Remove some redundantly user-declared copy ctors and assignment ops
...that trigger -Werror,-Wdeprecated-copy ("definition of implicit copy
{constructor, assignment operator} for ... is deprecated beause it has a
user-declared copy {assignment operator, constructor}") new in recent Clang 10
trunk (and which apparently warns about more cases then its GCC counterpart, for
which we already adapted the code in the past, see e.g. the various
"-Werror=deprecated-copy (GCC trunk towards GCC 9)" commits)

Change-Id: Ie37bd820e6c0c05c74e1a862bb1d4ead5fb7cc9c
Reviewed-on: https://gerrit.libreoffice.org/83698
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-25 23:07:42 +01:00
Noel Grandin
916746a515 sc: rowcol: tdf#50916 convert segmenttree
Change-Id: Ia05d1bc60a76a8bbf65afe5b0459ce213be9bfbe
Reviewed-on: https://gerrit.libreoffice.org/83646
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-25 11:56:27 +01:00
Julien Nabet
9d63592d53 cppcheck: performing init in init list (sc/scripting/sd)
Change-Id: I8bd4c1b7b551a96ecd5a2b50fbfdf225567175f6
Reviewed-on: https://gerrit.libreoffice.org/83621
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-11-24 22:52:21 +01:00
Mike Kaganski
3e1f0c060f tdf#128976: properly calculate default value when writing XLS
XLS stores default column width as 16-bit unsigned integer in the range
from 0 to 255 inclusive ([MS-XLS] 2.4.89 DefColWidth), unlike in OOXML
where any floating-point value is valid. Additionally, some correction
is used, introduced in commit 555d702903
(basis of empirical formula in XclTools::GetXclDefColWidthCorrection
is unclear). So in XLS, when the default is calculated, we need to take
into account if the resulting stored value will actually represent our
calculated value. If not, then just ignore the calculated value, and
use arbitrary 8 as the default.

With that, following IsDefWidth will correctly check if passed width
is represented by the stored default or not. All widths that can't be
represented as integral count chars in DefColWidth will have fUserSet
set in corresponding ColInfo records, thus correctly keeping widths.

Change-Id: Iedcc5583c861f5b18a422a9b279c48cff729cbc5
Reviewed-on: https://gerrit.libreoffice.org/83613
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-11-24 19:28:38 +01:00
Andrea Gelmini
6636712f5d Fix typo
Change-Id: Ibf2e90ff53f201d7b1f279c11eb8238eb403c05e
Reviewed-on: https://gerrit.libreoffice.org/83533
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-11-22 22:31:10 +01:00
Noel Grandin
5f520f7577 make some classes module-private
Change-Id: If7303a082e06f6937fca911c578a40475546cda2
Reviewed-on: https://gerrit.libreoffice.org/83442
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-22 20:31:27 +01:00
Mike Kaganski
2a16decdcc tdf#128951: restore passing nullptr to ScTableSheetObj when not inserted yet
This partially reverts 009e7a54f4

Change-Id: I5a9605ff9d0ff1cd825968fb247b2a3bf4b2902a
Reviewed-on: https://gerrit.libreoffice.org/83464
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-11-22 17:04:24 +01:00
Dennis Francis
b30251ca0d tdf#128894: xlsx-import : Do not share tokens between cells...
which are part of a xlsx-shared-formula along a *row*.
If we do, any reference-updates on these cells while editing
will mess things up.

For example a shared formula "=A30+1" used for a few cells in
the first row (say, A1, B1, C1 and D1) and on deleting a row,
say row#5, the reference update operation will decrement the
row index of all tokens in A1, B1, C1 and D1. But if they
share tokens, they all end up pointing to row#26 instead of
row#29 as each cell is updated which amounts to decrementing
4 times instead of once.

However shared formulas along columns are not affected by this
bug, when tokens are shared since we use formula-groups which
only keeps one copy of token array for the entire group and
reference-update code is designed to correctly work with
formula-groups.

Change-Id: Ic0fe84d12fef18fbf21658664e2b2b86409bca27
Reviewed-on: https://gerrit.libreoffice.org/83361
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Reviewed-by: Eike Rathke <erack@redhat.com>
2019-11-22 12:58:57 +01:00
Stephan Bergmann
f853ec317f Extend loplugin:external to warn about classes
...following up on 314f15bff0 "Extend
loplugin:external to warn about enums".

Cases where free functions were moved into an unnamed namespace along with a
class, to not break ADL, are in:

  filter/source/svg/svgexport.cxx
  sc/source/filter/excel/xelink.cxx
  sc/source/filter/excel/xilink.cxx
  svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx

All other free functions mentioning moved classes appear to be harmless and not
give rise to (silent, even) ADL breakage.  (One remaining TODO in
compilerplugins/clang/external.cxx is that derived classes are not covered by
computeAffectedTypes, even though they could also be affected by ADL-breakage---
but don't seem to be in any acutal case across the code base.)

For friend declarations using elaborate type specifiers, like

  class C1 {};
  class C2 { friend class C1; };

* If C2 (but not C1) is moved into an unnamed namespace, the friend declaration
must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see
C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither
qualified nor a template-id and the declaration is a function or an
elaborated-type-specifier, the lookup to determine whether the entity has been
previously declared shall not consider any scopes outside the innermost
enclosing namespace.")

* If C1 (but not C2) is moved into an unnamed namespace, the friend declaration
must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882>
"elaborated-type-specifier friend not looked up in unnamed namespace".

Apart from that, to keep changes simple and mostly mechanical (which should help
avoid regressions), out-of-line definitions of class members have been left in
the enclosing (named) namespace.  But explicit specializations of class
templates had to be moved into the unnamed namespace to appease
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of
template from unnamed namespace using unqualified-id in enclosing namespace".

Also, accompanying declarations (of e.g. typedefs or static variables) that
could arguably be moved into the unnamed namespace too have been left alone.

And in some cases, mention of affected types in blacklists in other loplugins
needed to be adapted.

And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which
is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is
not moved into an unnamed namespace (because it is declared in
sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is.  GCC warns about
such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler
doesn’t give this warning for types defined in the main .C file, as those are
unlikely to have multiple definitions."
(<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>)  The
warned-about classes also don't have multiple definitions in the given test, so
disable the warning when including the .cxx.

Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4
Reviewed-on: https://gerrit.libreoffice.org/83239
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-22 12:57:32 +01:00
Caolán McNamara
f31d36966b tdf#124513 let wizard reappear on tabbing back to document
where it was showing before tabbing away

Change-Id: Ia87aeb9789ae034611431983c6489569a59d47d3
Reviewed-on: https://gerrit.libreoffice.org/83434
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-22 11:53:40 +01:00
Noel Grandin
7e6897b7c3 ScQueryParam can be allocated inline in ScQueryCellIterator
Change-Id: I9debf80755a3950cc34be280af8006e52006b14a
Reviewed-on: https://gerrit.libreoffice.org/83313
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-21 20:00:12 +01:00
Aditya
844b4ac410 tdf#47490: Show overwrite warning when pasting data using "Enter"
In Calc when a cell is copied and its value is filled/pasted to different
 cell(s) by using the "Enter" key when focus is on selected cells --
 replace warning is not shown even if the selected cells have values of
 their own inside it. The old data is simply lost. Provide a replace
 warning dialog box whenever such a case is encountered.

Change-Id: I13acb424bc449e096512b5a0864ebc47a407f234
Reviewed-on: https://gerrit.libreoffice.org/83333
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-11-21 19:00:13 +01:00
Eike Rathke
8b84f08f33 Turn useless OSL_FAIL/OSL_ENSURE into assert()
Change-Id: Idc1cbb5ba7580963dd47f293d4104998d1f0095d
Reviewed-on: https://gerrit.libreoffice.org/83218
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
2019-11-20 15:42:46 +01:00
Noel Grandin
d468958331 tdf#128812 speed up loading calc doc with lots of countif
by creating a copy of ScQueryCellIterator that is specialised for this
use-case.
Takes the opening time from 50s to 8s on my machine.

Change-Id: I193a7c181a5dfed6fecf75e871729d73625d0df6
Reviewed-on: https://gerrit.libreoffice.org/83299
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-20 15:02:50 +01:00
Noel Grandin
98f2bd667c loplugin:unusedmethods
Remove a filtering step in the python script that was hiding some
results

Change-Id: Id94268f150902405ab197c077f18aaedf98845fc
Reviewed-on: https://gerrit.libreoffice.org/83256
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-20 09:59:17 +01:00
Caolán McNamara
22fb7b07d7 cid#1399334 Uncaught exception
and

cid#1399224 Uncaught exception
cid#1399153 Uncaught exception
cid#1399090 Uncaught exception

Change-Id: Icbafde4a1e1bd1713c25a20337f3e2d0f4103cad
Reviewed-on: https://gerrit.libreoffice.org/83240
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-20 09:57:27 +01:00
Andrea Gelmini
0db3469808 Fix typo
Change-Id: I5ae932e727eb3bb4cef3f7e160c3ace32e3f7d47
Reviewed-on: https://gerrit.libreoffice.org/83225
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-11-19 22:34:51 +01:00
Caolán McNamara
d4a4c9717a don't crash if a linked to object is deleted after the doc is loaded
Change-Id: Ia6ab1261745d223dcf84b638edf6a64d46bc6f4b
Reviewed-on: https://gerrit.libreoffice.org/83201
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-19 22:19:38 +01:00
Caolán McNamara
03fe7f500f cid#1448453 Untrusted value as argument
Change-Id: I41a2f30df22b54e51acb593f340cb1ecf1c497b6
Reviewed-on: https://gerrit.libreoffice.org/83037
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-19 22:16:50 +01:00
Caolán McNamara
52a3f07daf Related: tdf#125917 remove active editing when we want to replace contents
this addresses comment #6 so that the chosen value is entered in the cell

Change-Id: I3b45301e00b2f79038e88c926f15babd49dcc2bf
Reviewed-on: https://gerrit.libreoffice.org/83085
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-19 10:51:12 +01:00
Caolán McNamara
72bfc8aced tdf#125917 Ensure mouse is captured before the menu is launched
calc seems to excessively capture the mouse and grabs + floats are messy across
the different ports. But We usually have the mouse captured before calling the
menu, except if we are editing a cell, an additional capture here will ensure
the grab status is the same in both modes and that events go to the same place
in either case.

Change-Id: I213560273be1a6a398d6a1787a53d64501c473f0
Reviewed-on: https://gerrit.libreoffice.org/83130
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-19 09:54:28 +01:00
Caolán McNamara
1aaa229af7 Related: tdf#125917 release mouse grab before showing warning dialog
Type text into the data validity dropdown cell and click elsewhere.
The warning dialog cannot be interacted with due to the active mouse
grab to its parent

Change-Id: I51702c828dee6ec88106f7d44d7e3440f2e61298
Reviewed-on: https://gerrit.libreoffice.org/83128
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-19 09:53:35 +01:00
Caolán McNamara
752cc49c97 cid#1399259 Uncaught exception
Change-Id: Ia811eeb04cb9ab86aea205aa848e210fc34ab9d6
Reviewed-on: https://gerrit.libreoffice.org/83072
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-19 09:51:57 +01:00
Samuel Mehrbrodt
9e3ba7c303 tdf#97926 Add UNO API for Infobar
This allows creating, updating and removing infobars from macros/extensions.

It also extends the infobar with a primary and a secondary text, so there can
be a bold summary at the beginning at the infobar with a longer text following
in normal letters.

Macro sample:
------------------------------------------------------------
Sub AddInfobar
	dim buttons(1) as new com.sun.star.beans.StringPair
	buttons(0).first = "Close doc"
	buttons(0).second = ".uno:CloseDoc"
	buttons(1).first = "Paste into doc"
	buttons(1).second = ".uno:Paste"
	ThisComponent.getCurrentController().appendInfobar("my", "Hello world", "Things happened. What now?", com.sun.star.frame.InfobarType.INFO, buttons, true)
End Sub

Sub UpdateInfobar
	ThisComponent.getCurrentController().updateInfobar("my", "WARNING","Do not read this message.", com.sun.star.frame.InfobarType.WARNING)
End Sub

Sub RemoveInfobar
	ThisComponent.getCurrentController().removeInfobar("my")
End Sub
------------------------------------------------------------

Change-Id: I5d0a223525845d23ffab17acdaa431e0eb783fec
Reviewed-on: https://gerrit.libreoffice.org/29816
Reviewed-by: Serge Krot (CIB) <Serge.Krot@cib.de>
Tested-by: Serge Krot (CIB) <Serge.Krot@cib.de>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-11-19 08:51:43 +01:00
Noel Grandin
00e1adec49 crashtesting fdo78617-2.ods
as a consequence of
	commit feec8e3c34
	Date:   Tue Nov 12 16:00:55 2019 +0200
    reduce iteration in ScViewData::GetScrPos

Change-Id: Iec539c33bd80b9ad2d2a3698d443c5cec81f8f85
Reviewed-on: https://gerrit.libreoffice.org/83093
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-18 19:29:46 +01:00
Caolán McNamara
9eae3a528e cid#1399260 Uncaught exception
Change-Id: I975716ae1f7406af57cc4141f4cbdb9e5e4c4bd2
Reviewed-on: https://gerrit.libreoffice.org/83074
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-18 14:57:19 +01:00
Caolán McNamara
c2cb3af28a cid#1448537 silence Wrapper object use after free
Change-Id: I896556485c441c9d0e79e75f41d0eb452f0eb21f
Reviewed-on: https://gerrit.libreoffice.org/83069
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-18 14:35:17 +01:00
Regina Henschel
58ee73068f tdf#103092 export uses MeasureUnit not FieldUnit
ctor of SvXMLExport expects a util::MeasureUnit, but getMetric() from
XGlobalSheetSettings returns a FieldUnit. The conversion was missing.
So FieldUnit::MM (=1) was treated as MeasureUnit::MM_10TH (=1). But
that one has no unit string, so the 'translate' transformation got
numbers without unit, which then were wrongly interpreted.

Change-Id: I433c7534be21655887863005f14836d2b733cf1f
Reviewed-on: https://gerrit.libreoffice.org/83004
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2019-11-18 14:22:42 +01:00
Noel Grandin
efab55fee2 convert AccessibilityFlowTo to scoped enum
and drop the unused FORSPELLCHECKFLOWTO

Change-Id: I128e84d386c10d001aa63f93b4b6dcb7238a1242
Reviewed-on: https://gerrit.libreoffice.org/83060
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-18 11:15:48 +01:00
Caolán McNamara
959dab6e06 cid#1430084 Arguments in wrong order
add an annotation

Change-Id: Id3b90eae8a2306cfb7f0f46b3fd73e320c851f6a
Reviewed-on: https://gerrit.libreoffice.org/83029
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-17 22:18:41 +01:00