2546 Commits

Author SHA1 Message Date
Marco Cecchetti
d4ddc8cb00 LOK: Calc: fixed missed tile invalidations on cell text editing
What's new:
1) when an edit view is killed, the area which was used by the edit
view is invalidated for both own window and other view windows after
the edit view has been destroyed;

2) when an edit view is created or its out area is expanded, the
windows of other views are invalidated too;

3) when a vertical scroll occurs in the edit view area the windows of
other view are invalidated too;

4) same methods renaming since now we add/remove windows not edit
views.

Change-Id: Iac54f5b182c9562f08bb724f9ddde1c26cffa2e7
Reviewed-on: https://gerrit.libreoffice.org/29783
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-10-14 15:07:56 +00:00
Marco Cecchetti
6c9337866d LOK: Calc: missing invalidate when ending larger-than-cell edit text
- reason: when text content goes further than the cell border the
output area of the edit view is grown (extended to an adjacent cell),
on the contrary the output area of edit views used only for
invalidating windows of other view shells is never updated, so, in
other views, only the tile where the edit cell is placed is
invalidated;

- solution: instead of adding fake edit views for invalidation porpuse
(and having to updated the output area of each of them when required),
the new solution provides each new edit view, created on cell editing,
with a set of `foreign` windows related to other views, they are added
and removed to this collection owned by an edit view still using the
ScExtraEditViewManager, which has been in turn simplified; when
EdiEngine::UpdateViews is invoked not only the window where the edit
view lives is invalidated but also all `foreign` windows in the owned
set;

- note: ScTiledRenderingTest::testTextEditViewInvalidations unit test
has been enhanced in order to test correct invalidation when text
content goes out of the starting tile.

Change-Id: Id223fb1a032d3b18d2cf70df31f704abd245b3ac
Reviewed-on: https://gerrit.libreoffice.org/29625
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/29658
2016-10-14 15:01:36 +00:00
Noel Grandin
17ec3b96de pass params to Outliner LINK callbacks on stack
instead of yuck..cough... on itself, which is horribly vulnerable to re-
entrancy

Change-Id: I8f3d6d39ee50fd36b56b431978cf6c2499c375a6
Reviewed-on: https://gerrit.libreoffice.org/29756
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-13 11:16:13 +00:00
Noel Grandin
62223f9a8a loplugin:unnecessaryoverride
Change-Id: I08c55a3023ec2e8990098eeb60e91cd18556e7ae
Reviewed-on: https://gerrit.libreoffice.org/29656
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-13 06:47:44 +00:00
Noel Grandin
5c84f40ea2 loplugin:constantfunction
update the plugin similarly to
    commit 3ee3b36ae0c064fb5c81268d8d63444309d1b970
    Author: Stephan Bergmann <sbergman@redhat.com>
    Date:   Fri Oct 7 12:05:49 2016 +0200
    loplugin:staticmethods: Don't be fooled by decls starting with macros

Change-Id: I98ac3216d5acf89a49a26feb089ae2fd34e6e510
Reviewed-on: https://gerrit.libreoffice.org/29665
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-11 06:15:21 +00:00
Noel Grandin
666787c4bc reduce indentation
Change-Id: I9645e083ea61347fa323f84a271937e98d4f8eb3
2016-10-10 15:44:13 +02:00
David Tardon
24e0709fb4 fix debug build
Change-Id: Idbdb3f00faed2a0ae3f58393abf6e345e7d2363c
2016-10-05 09:11:33 +02:00
Noel Grandin
954f752cf1 convert MapUnit to scoped enum
I left a prefix on the names "Map" so that I would not have to re-arrange
each name too much, since I can't start identifiers with digits like "100thMM"

And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore.

Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224
Reviewed-on: https://gerrit.libreoffice.org/29096
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05 06:51:20 +00:00
Stephan Bergmann
106ea87205 Remove _TYPED suffix from tools/link.hxx macros
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually
typed Link" to distinguish the new, typed versions from the old, untyped ones,
but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173
"remove untyped Link<>" removed the old versions.

Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-05 07:56:12 +02:00
Noel Grandin
ba3521f288 add more dumpAsXml()
and make it format the output nicely, so I don't have to use 'xmllint
--format' before I can read it.

Change-Id: I065ee93193f3c6c7bab87212ab96021fb0d7c5ed
Reviewed-on: https://gerrit.libreoffice.org/29407
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-03 06:08:14 +00:00
Andrea Gelmini
943919692e Fix typos
Change-Id: I8374d6d08f4eb4ae2821e213371c615b92d7e9ab
Reviewed-on: https://gerrit.libreoffice.org/29432
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-01 19:02:02 +00:00
Justin Luth
a324e85cbb tdf#101815 editeng SetMustRepaint when InsertText
Change-Id: Ib66e7d53c231ac40f59593fd45a0706418a9398c
Reviewed-on: https://gerrit.libreoffice.org/28717
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
2016-09-30 04:17:29 +00:00
Noel Grandin
5af110e20b variable name and indentation improvement
Change-Id: Ia3a97b08e1280e3665a56cdbb25ad07687dc7040
2016-09-28 08:44:36 +02:00
Noel Grandin
678bdd064a extend dumpAsXml to EditDoc
Change-Id: I71464b20c5897a2af3b4069f7f0963ef55dcd8c4
2016-09-28 08:44:36 +02:00
Jochen Nitschke
4563921f23 remove unused parameter
bTotalRanges is never used.
SFX_ITEMSET_NO_DEFAULT_CTOR is no where else used.

Change-Id: Ia35ea875f16a8ca04c2173b01074113f1825f565
Reviewed-on: https://gerrit.libreoffice.org/29248
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-25 18:56:19 +00:00
Caolán McNamara
dd691312a3 we shouldn't need explicit lt_rtl_OUString, etc things anymore
Change-Id: Ibeec3fcc353e07e61fb2c838b318e0a04081ce2c
2016-09-24 12:15:13 +01:00
Eike Rathke
7d8196ea2f perf: eliminate SfxSimpleHint and move to SfxHint, tdf#87101 related
There were over 150 places in *::Notify() functions that did some
dynamic_cast<SfxSimpleHint*> of which ~98% were unnecessary because the
base class SfxHint passed was an SfxSimpleHint anyway. dynamic_cast
operations come with quite some cost, so avoid if possible. Specifically
for ScFormulaCell::Notify() that created a bottleneck in scenarios where
cells were notified that already handled a previous notification. In
mass operations doing the dynamic_cast before it could be decided
whether having to act on it or not this made 2/3 of all time spent in
the Notify() call.

To get rid of that rename/move SfxSimpleHint to SfxHint and let classes
derive from SfxHint instead of SfxSimpleHint. This comes only with a
slight cost that an additional sal_uInt32 is transported in such hints,
initialized to 0, but this is neglectable compared to the huge gain.

For the rare cases where a Notify() actually expects both, an SfxHint
(formerly SfxSimpleHint) and a derived hint, this changed order of the
dynamic_cast involved so the simple SfxHint::GetId() is handled last.
Modules using such combinations can further optimize by treating the
simple SfxHint::GetId() first once verified that none of the other
derived hints use an ID not equal to zero respectively none of the ID
values the simple hint uses.

Change-Id: I9fcf723e3a4487ceb92336189d23a62c344cf0ce
Reviewed-on: https://gerrit.libreoffice.org/29205
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-09-23 15:14:03 +00:00
Miklos Vajna
5878bb1d2f editeng: fix loplugin:cppunitassertequals warnings
Change-Id: Icccd2db45616de708d83058d76ace312db8af94e
2016-09-23 11:30:10 +02:00
Noel Grandin
a1720f3a01 convert C_ constants to typed_flags
Change-Id: Ia80cef26edce3e0a664044f3ca65d33998546d0f
2016-09-22 09:25:49 +02:00
Caolán McNamara
0bfefc0b39 Resolves: tdf#83037 <--> corrected into ← → instead of ↔
don't use - as a word separator except for breaking up
a compound word for the purposes of tdf#55693, e.g.
TEst-TEst autocorrected to Test-Test)

Change-Id: Ie52a16af0b5838d1ba0de9c5f9c30dcab05c3bc7
2016-09-21 20:37:13 +01:00
Noel Grandin
51c6e9153d convert SfxItemPresentation to scoped enum
Change-Id: Ibf605706a9f804ab509ac4f92f5f88fcf3daebc1
Reviewed-on: https://gerrit.libreoffice.org/29131
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-21 09:24:55 +00:00
Noel Grandin
90fd9bdef5 loplugin:implicitboolconversion
Change-Id: Id7dafb926a0eb7fae5e481555eae3d35fe795900
2016-09-21 09:37:15 +02:00
Noel Grandin
3153c581e0 spelling Surregate->Surrogate
Change-Id: Ic7d79036f4e94a487c9b12edb18d6e4098938585
2016-09-21 09:34:13 +02:00
Noel Grandin
553f10c71a add dumpAsXml() to more pool items
Change-Id: I276109148bab8180ce2442f5ee69722357362453
2016-09-21 09:06:33 +02:00
Stephan Bergmann
61794421b1 Related cid#1371287: Improve code to not depend on missing move assignment
Change-Id: I4c03ad08078e25ea7f7d754e6eaa587da7984c9d
2016-09-20 11:20:31 +02:00
Stephan Bergmann
582321c1f6 Missing initialization of SvxBorderLine::m_pColorGapFn
...since 6dd4905a7ac93a48dc87358da3ba0a8078bbb6cf "loplugin:constantparam in
dbaccess..editeng"

Change-Id: Ib27615069ac1c7061ad691aada227ebdd70326e5
2016-09-15 15:34:04 +02:00
Michael Stahl
b647996a9b replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)
... except in include/rtl, include/sal, include/uno, where sal_Size is
retained for compatibility, and where callers of rtl functions pass in
pointers that are incompatible on MSVC.

Change-Id: I8344453780689f5120ba0870e44965b6d292450c
2016-09-15 12:01:11 +02:00
Andras Timar
486f906436 Revert 8c4dbcef8f and provide a better fix
This reverts commit 8c4dbcef8f92c9bd1c2208e7de7971f184f8a3ff.

bccu#1781 bug was in LibreOffice Online. After deletion of the selected
editeng text, the selection did not disappear. By making the fix conditional
to LibreOfficeKit::isActive(), we can avoid the weird selection problem in
desktop editeng.

Change-Id: I78c68b5a79db816ea4d0bdf3d75dd1ba4c269106
Reviewed-on: https://gerrit.libreoffice.org/28900
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-09-14 14:16:35 +00:00
Miklos Vajna
2ea385a54b sw draw text: emit LOK_CALLBACK_TEXT_VIEW_SELECTION from registerCallback()
With this, in case the first view has an active text edit selection and
a new view is created, then the text selection is instantly visible in
the second view, even if the first view's text selection does not change
later.

Change-Id: I3255febd5d65d6576ddbc57cf96836bdf0b06a72
2016-09-13 20:27:51 +02:00
Miklos Vajna
586789fe75 sw draw text: emit LOK_CALLBACK_INVALIDATE_VIEW_CURSOR from registerCallback()
With this, in case the first view has an active text edit and a new view
is created, then the cursor position is instantly visible in the second
view, even if the first view's cursor does not move later.

Change-Id: Ia82e7dc1ce9bb58c67a280179ecadc74d3b63026
2016-09-13 16:48:28 +02:00
Noel Grandin
df89e03809 rename ContentInfo attribs field and methods to charAttribs
to match naming higher up the call stack

Change-Id: I8a89625de5d834b32fd6ea863ebc4152956a21fe
2016-09-13 16:14:47 +02:00
Noel Grandin
c010ed6ba4 impress: extend dumpAsXml to style information in ContentInfo nodes
Change-Id: I783f6ad9b71f18c070537e4806381a103960b6eb
2016-09-13 16:14:47 +02:00
Jochen Nitschke
7aa10d2be1 fix out of bounds error
there are 22 entries, but Sequence was allocated with 21 fields

Change-Id: I6af71e2ece99b643843b4d82e0c6be332be361fa
Reviewed-on: https://gerrit.libreoffice.org/28852
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-09-13 13:09:44 +00: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
Noel Grandin
6dd4905a7a loplugin:constantparam in dbaccess..editeng
Change-Id: I1d0dc3d89933d86cd229e503b350fccc1523dedc
Reviewed-on: https://gerrit.libreoffice.org/28833
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-13 06:14:41 +00:00
David Tardon
8e11d35366 use std::unique_ptr
Change-Id: I8ba37267e8a7058ade54783ea0e117a8f8816c45
2016-09-09 16:16:45 +02:00
Noel Grandin
cb958bb5e0 loplugin:constantparam in sot..svl
Change-Id: I08db2db3b90725c556e3ba062da5d62d98f6e882
Reviewed-on: https://gerrit.libreoffice.org/28769
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-09 11:27:23 +00:00
Noel Grandin
e61b20dc1a rename CollapsAttribs -> CollapseAttribs
Change-Id: Ic70f67fb7e0e557a3a726f44aef25931def49835
2016-09-08 08:33:46 +02:00
Noel Grandin
17b1bbb548 improve comment grammar
Change-Id: Ic7da4b4d67bb006290af6c7b9e5d084d13b6ca98
2016-09-08 08:33:46 +02:00
Noel Grandin
87ee6c044d convert Orientation to scoped enum
Change-Id: Ifbfcf3557ca2a16d21e7a1d613ee54c1c6625f07
2016-09-05 08:21:46 +02:00
Noel Grandin
a881fd7e66 convert RasterOp to scoped enum
Change-Id: I136423c105316c9b5b18e64d04a248fd7ac5590b
2016-09-05 08:21:46 +02:00
Michael Stahl
9670f0d17f editeng: don't let wild-card auto-correct leave current word
If a paragraph has e.g. multiple -> in it then auto-correct of the first
one will create via the .*->.* rule a new auto-correct entry that has as
long-word the word that contains the first -> until the last -> and
everything in between.  This will be somewhat irritating when it is
eventually applied.  Avoid it by limiting the wild-card loop to the
current word, which is apparently the intent anyway.

(regression from a07425892205ff8951027ea20459b97370d01de6)

Change-Id: I294bae863c44eb460627b61b4383133131fe4b3a
Reviewed-on: https://gerrit.libreoffice.org/28608
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-09-02 21:00:10 +00:00
Caolán McNamara
66f7aaf766 coverity#1372384 Uncaught exception
Change-Id: I4451623ba950b93e0efba5b3ec755622c2bea2bc
2016-09-01 10:40:14 +01:00
Jochen Nitschke
705574be7a use SfxItemPool::IsWhich instead of custom implementation
Change-Id: I56cbdc1ede491486643f73a98117c5cd4ce77c1d
Reviewed-on: https://gerrit.libreoffice.org/28564
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-01 06:46:46 +00:00
Jochen Nitschke
95bfa2c03d use SfxItemPool::IsSlot instead of custom implementation
Change-Id: I435fb78f10f361120ee1865465dab93aa4661806
Reviewed-on: https://gerrit.libreoffice.org/28565
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-01 06:38:06 +00:00
Stephan Bergmann
0c9a71a7b2 loplugin:stringconstant: adapt to improved OUStringLiteral1 (editeng)
Change-Id: If8d2eb5e02a107cc1805e349a70df54160fed02a
2016-08-30 15:27:48 +02:00
Stephan Bergmann
88c80411cb loplugin:implicitboolconversion
Change-Id: Ia50bd6ecc6a4b5efc2de81282a16203e89087314
2016-08-30 14:38:24 +02:00
Caolán McNamara
776e2e2635 Resolves: tdf#96369 don't superscript ordinals for mixed text and numbers
e.g. 5th is ok, but foo5th is not

this is basically a regression from

commit 17e6b8fd05af8fff86847c0ef1e8cc9ad013a1bd
Date:   Thu Apr 7 13:33:48 2011 +0200

where the older code would only do the conversion if the string
before the number was comprised of non-letters, so go back
to that logic.

Change-Id: I928c365eb11891e78331bbd165dbdb9541ac0361
2016-08-30 12:47:44 +01:00
Stephan Bergmann
5536aea822 Let OUStringLiteral1 take its arg as ctor arg, not template arg
...which makes it more flexible, can now also be used on non-const arguments.
The drawback of the argument no longer being a compile-time constant is remedied
by making the ctor constexpr.

Change-Id: Ia4903a2cc86791fece92eac0cb8406b6659dd19d
2016-08-30 07:43:52 +02:00
Jochen Nitschke
33b38082ca put StreamMode masks in scope of enum class
Change-Id: I77682f7e289a59b986bb84edf014029a20266470
Reviewed-on: https://gerrit.libreoffice.org/28420
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-27 12:06:15 +00:00