summaryrefslogtreecommitdiff
path: root/editeng
AgeCommit message (Collapse)AuthorFilesLines
2019-12-07tdf#121658 Add option to not hyphenate words in CAPSSamuel Mehrbrodt3-50/+60
* Add checkbox to pagraph dialog * Store property in paragraph model * Move docx import/export from grabbag to paragraph model * Add ODF import/export * Add ODF unit test * Add layout test Change-Id: Id4e7c5a0ad145c042f862995d227c31ae2aa0abd Reviewed-on: https://gerrit.libreoffice.org/83979 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 72bd0df107ee47c4d54fa88b4960d32ea03e9f69) Reviewed-on: https://gerrit.libreoffice.org/84620
2019-12-06tdf#128666 Only enable hyperlink actions when just the field is selectedSamuel Mehrbrodt1-11/+17
Change-Id: I984df967877a47fb9f89c3626737348a87d3ffa5 Reviewed-on: https://gerrit.libreoffice.org/84418 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit f31c3ebb60e4678eb09e377b638b368531df47dc) Reviewed-on: https://gerrit.libreoffice.org/84571
2019-11-28tdf#128659 Cannot add AutoCorrect entriesNoel Grandin1-1/+2
regression from commit 77dec7588c9141b03f8ec0139eb96c298b26f261 tdf#109158 improve sorting when loading large autocorrect file The insert operation in the maSortedVector case had the "check for duplicates" operation the wrong way around Change-Id: Id8a9d044c661668e74f01eb15635c35ca70da540 Reviewed-on: https://gerrit.libreoffice.org/83344 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 208ca3d33d4e6dff9e70a3efa098628b02151729) Reviewed-on: https://gerrit.libreoffice.org/83992
2019-11-06make some classes module-privateNoel Grandin1-1/+1
Change-Id: I00ab3a3f6a8bbc85320e7b4fd1aa13af798e7e4c Reviewed-on: https://gerrit.libreoffice.org/82062 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-06loplugin:indentation find broken if statementsNoel Grandin2-2/+2
so I don't read the "then" block as being a sequential statements Change-Id: Ib2004acd3518bd4ebd2246f02a26c2c0a8bbab4c Reviewed-on: https://gerrit.libreoffice.org/82069 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-03size some stringbuffer to prevent re-allocNoel Grandin1-1/+1
I started with 32 and kept doubling the size until the site did not need re-alloc, but clamped it at 512. Change-Id: I55fe36b31cd3d40f86e5729337a927cf920f2af6 Reviewed-on: https://gerrit.libreoffice.org/81960 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-03loplugin:stringaddNoel Grandin1-4/+4
tweak the plugin to be more permissive, then validate by hand afterwards Change-Id: I40c5c911fe6ff7e45baaca372abf7dac211d9654 Reviewed-on: https://gerrit.libreoffice.org/81942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-31avoid intermediate vcl::WindowsCaolán McNamara4-21/+15
Change-Id: Iac6bc83265e007a699a8993b89ac2efaa3739d95 Reviewed-on: https://gerrit.libreoffice.org/81761 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-29remove unnecessary includesCaolán McNamara3-3/+2
Change-Id: Ia4a622b34ff3f71963cff7a1aa8658a4df12f04f Reviewed-on: https://gerrit.libreoffice.org/81676 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-23loplugin:unusedfieldsNoel Grandin3-7/+3
Change-Id: I1f69ec45e7d44e45a6ece1fe9d9eef8a2be2d6ff Reviewed-on: https://gerrit.libreoffice.org/81361 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-23size some stringbuffer to prevent re-allocNoel Grandin2-2/+2
Change-Id: I385587a922c555c320a45dcc6d644315b72510e9 Reviewed-on: https://gerrit.libreoffice.org/81278 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21loplugin:virtualdead unused param in EditEngine::FieldClickedNoel Grandin7-11/+9
Change-Id: Iffe075960308d5058cb7535e9216caa37aabe0c5 Reviewed-on: https://gerrit.libreoffice.org/81232 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21loplugin:virtualdead unused param in UnknownAttrTokenNoel Grandin3-5/+5
Change-Id: Iccf88b919cfc40419271e6f18d101027ef2bb9df Reviewed-on: https://gerrit.libreoffice.org/81218 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-19Fix typo and dotsAndrea Gelmini1-1/+1
Change-Id: Ia34130dbab42d61074a73a2b16e03360b5b123b6 Reviewed-on: https://gerrit.libreoffice.org/81086 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2019-10-18make bin/update_pch.s always include code in trivial #if'sLuboš Luňák1-2/+12
E.g. #ifdef LIBO_INTERNAL_ONLY is always true for code that builds with our PCHs. Change-Id: I3cf311ea3621b909105754cfea2cb0116b8b67f5 Reviewed-on: https://gerrit.libreoffice.org/80961 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-10-17Rename OUStringLiteral1 to OUStringCharStephan Bergmann9-13/+13
It started out as a wrapper around character literals, but has by now become a wrapper around arbitrary single characters. Besides updating the documentation, this change is a mechanical for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f Reviewed-on: https://gerrit.libreoffice.org/80892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-16Resolves: tdf#127961 Add NBSP to quotation marks for all French except fr-CHEike Rathke1-12/+2
Change-Id: I71e8377bf44c2db5ef291d2990528ec16aaf3b44 Reviewed-on: https://gerrit.libreoffice.org/80909 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-10-16loplugin:bufferadd loosen some constraintsNoel Grandin1-4/+1
and extend O*StringView to have a constructor that takes a pointer and a length Change-Id: I6120e96280f030757e855a6596efdae438b7e1e8 Reviewed-on: https://gerrit.libreoffice.org/80872 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-16loplugin:stringadd look through a couple more known-good methodsNoel Grandin1-2/+2
Change-Id: Ifbdb3e41eae665f7dcaf5301aaba2b6e4662cf48 Reviewed-on: https://gerrit.libreoffice.org/80855 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-14loplugin:stringadd look for unnecessary temporariesNoel Grandin4-14/+14
which defeat the *StringConcat optimisation. Also make StringConcat conversions treat a nullptr as an empty string, to match the O*String(char*) constructors. Change-Id: If45f5b4b6a535c97bfeeacd9ec472a7603a52e5b Reviewed-on: https://gerrit.libreoffice.org/80724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-11simplify "a = a +" to "a +="Noel Grandin5-46/+29
mostly so that my stringadd loplugin can point out places to improve Change-Id: I9920ee1c99cdb6b811ba67ff9d8e32aa261884b5 Reviewed-on: https://gerrit.libreoffice.org/80618 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-10convert WriteCharPtr..getStr to WriteOStringNoel Grandin1-4/+3
and improve the WriteOString method, we can avoid the strlen here, we already have the length One change in behaviour to be noted - if the string contains trailing zero bytes, which ARE INCLUDED IN THE STRING LENGTH, i.e. I'm not talking about the normal terminating zero, then this patch changes behaviour because we will now write those zeros to the stream. Change-Id: I4668b9b9eb877f820b1dc70d6cd10ba2623bc0a2 Reviewed-on: https://gerrit.libreoffice.org/80597 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-08tdf#128009: Allow spaces in AutoText suggestionsMike Kaganski1-10/+44
Currently autotext entries with long names starting with spaces, or containing spaces after first or second character, would never be suggested when SvxAutoCorrCfg::IsAutoTextTip() gives true (set in Tools -> AutoCorrect -> [x] Display remainder of name as suggestion while typing), because only a single word no less than 3 chars long left to cursor is considered a candidate for the name matching. This change allows to consider multiple chunks of text left to the cursor as the candidates for name matching. The chunks are 3-9 characters long, may start only between words, and have spaces, including leading. Thus, AutoText entries with long names like " Dr Foo" will now be suggested for an entry like "lorem dr f". Change-Id: If91c957341a4f4b281acb0e4ada558706ea2f8c1 Reviewed-on: https://gerrit.libreoffice.org/80392 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-10-08loplugin:redundantpointerops simplify *p.get()Noel Grandin9-38/+38
Change-Id: I12517651fb3f777fd08e384992bb3e84b340ad85 Reviewed-on: https://gerrit.libreoffice.org/80382 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-07InsertQuote can be constMike Kaganski1-1/+1
Change-Id: I57b50e72b68b71406d1745304d24b52d75b3d082 Reviewed-on: https://gerrit.libreoffice.org/80342 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-10-07enable -Wrange-loop-analysis on clangNoel Grandin1-2/+2
Change-Id: I2095308943c94ad16c110d5fac47715398eb5d39 Reviewed-on: https://gerrit.libreoffice.org/80187 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-06improve SfxPoolItem operator== implementationsNoel Grandin6-27/+6
(*) make them all call the superclass operator== (*) make the base class check which and typeid to ensure we are only comparing the safe subclasses together (*) remove a couple of operator== that were not doing anything useful Change-Id: Ia6234aed42df04157a5d6a323dc951916a9cb316 Reviewed-on: https://gerrit.libreoffice.org/80308 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-05Drop bogus memsetStephan Bergmann1-1/+0
...that is both bad and unnecessary since 76643b208c7f0c43b0603e08a3b37f29878c42ea "loplugin:useuniqueptr in SvxNumRule" changed SvxNumRule::aFmts from an array or raw pointers to an array of std::unique_ptr. Change-Id: I889da7973958d5546ded67be4f51f6312b240ea9 Reviewed-on: https://gerrit.libreoffice.org/80275 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-04SvxAutoCorrect::GetPrevAutoCorrWord should not be constMike Kaganski1-3/+2
Change-Id: Icc5f8eae4347e097f7ff22212dd94467d0702353 Reviewed-on: https://gerrit.libreoffice.org/80198 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-10-04loplugin:unusedfieldsNoel Grandin1-2/+0
Change-Id: If0df5216dccd2c0a7aa790668471993f5d4d5d32 Reviewed-on: https://gerrit.libreoffice.org/80183 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-01Avoid redundant IsAtEnd: NextItem returns nullptr iif iterator is at endMike Kaganski2-20/+14
To keep the check efficient, split NextItem to inline and Impl parts Change-Id: Id5877a3c5bed73aac9c39c655b106a715cf888ea Reviewed-on: https://gerrit.libreoffice.org/79894 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-09-29Move Rectangle,Point,Size serialization to GenericTypeSerializerTomaž Vajngerl1-3/+5
Change-Id: Iae489fc31b13b836e1df5327ba2fa07e0325907a Reviewed-on: https://gerrit.libreoffice.org/79793 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-09-29constmethod for accessor-type methodsNoel Grandin1-2/+2
Apply the constmethod plugin, but only to accessor-type methods, e.g. IsFoo(), GetBar(), etc, where we can be sure of that constifying is a reasonable thing to do. Change-Id: Ibc97f5f359a0992dd1ce2d66f0189f8a0a43d98a Reviewed-on: https://gerrit.libreoffice.org/74269 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-28loplugin:virtualdead in editengNoel Grandin3-20/+1
Change-Id: I72f9cf62f9daeaed5108ede41dd41544204a9745 Reviewed-on: https://gerrit.libreoffice.org/79643 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-26add property name when throwing css::uno::UnknownPropertyExceptionNoel Grandin2-7/+7
Change-Id: I17f06c9415b9d43b6d8896360e07216c2856367a Reviewed-on: https://gerrit.libreoffice.org/79627 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-26drop unnecessary includes and update pchCaolán McNamara1-0/+1
Change-Id: Id7fa7d5b95c32fdc738a18208eb95eaec102d937 Reviewed-on: https://gerrit.libreoffice.org/79523 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-09-26tdf#127748: crash on modify a frame style, which has writing-mode bt-lrJulien Nabet1-1/+2
bt here: https://bugs.documentfoundation.org/attachment.cgi?id=154474 Change-Id: I6e6e0927ea85c4f0f4f59bf327ce5468fc428328 Reviewed-on: https://gerrit.libreoffice.org/79572 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-09-24support O(U)String::number() for fast string concatenationLuboš Luňák1-5/+5
When I did the fast string concatenation, I didn't add any support for number(), which simply returned a O(U)String, and so it did the extra allocation/deallocation, although that could be avoided. In order to support this, number() now returns a special temporary return type, similarly to O(U)StringConcat, which allows delaying the concatenation the same way. Also similarly, the change of the return type in some cases requires explicit cast to the actual string type. Usage of OString::getStr() is so extensive in the codebase that I actually added it to the helper class, after that it's only relatively few cases. Change-Id: Iba6e158010e1e458089698c426803052b6f46031 Reviewed-on: https://gerrit.libreoffice.org/78873 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-09-23do not require $(SRCDIR) in every gb_Library_set_precompiled_headerLuboš Luňák1-1/+1
Change-Id: I7b3a22584bb2e4d501f509ffcd80929feed23a4c Reviewed-on: https://gerrit.libreoffice.org/79360 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-09-20tdf#109158 improve load time of autocorrect XML fileNoel Grandin1-0/+2
Before, it seems to be doing a lot of unnecessary work because, by default, startFastElement will call startUnknownElement, which constructs various objects, etc. It seems to me that if the class already implements createFastChildContext, it is already using XFastParser, and so it should implement startFastElement to avoid that work. By avoiding going down the startUnknownElement path, reduces load time from 1.7s to 1.4s Change-Id: Ifd745cf2cc22a8cb988a5668332cf6e70bb996da Reviewed-on: https://gerrit.libreoffice.org/79269 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-20tdf#109158 improve sorting when loading large autocorrect fileNoel Grandin2-70/+81
reduces time from 2.0s to 1.7s reduce work by (*) reserving some arrays (*) pre-sorting with a cheaper comparator (*) don't copy when returning result, just return a const& (*) flattening the data-structures to reduce pointer-chasing Change-Id: I972bd7ffdbf2121c2d38c24aca9618ca708e920c Reviewed-on: https://gerrit.libreoffice.org/79119 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-06use unique_ptr in OutlinerNoel Grandin2-7/+7
Change-Id: I022cf01f2c36f8846227a89418735271880d1f95 Reviewed-on: https://gerrit.libreoffice.org/78715 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-06use unique_ptr in EditNodeIdxNoel Grandin2-6/+6
Change-Id: I59702aa3d54f60cb3e41410e82b0532bac05274f Reviewed-on: https://gerrit.libreoffice.org/78717 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-06TyposAndrea Gelmini9-19/+19
Mainly fixing '....' and '..' Change-Id: Ic928701b319868671b826d757dd94c296fd5e942 Reviewed-on: https://gerrit.libreoffice.org/78668 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-09-03Fix typosAndrea Gelmini1-1/+1
Change-Id: I71bacf86938af2b89a706c435c4f72a194ec8343 Reviewed-on: https://gerrit.libreoffice.org/78417 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-09-03Resolves: tdf#126935 a11y for hosted EditEngineCaolán McNamara2-164/+0
move it to svx so we can reuse the a11y code in svx for EditEngines hosted in shapes to provide a11y for EditEngines hosted in a native widget Change-Id: I4068c413cdb8ddb0d0ef899774fbe9f65e1bdc60 Reviewed-on: https://gerrit.libreoffice.org/78407 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-09-02assert on selecting text from end to start in shape with a11y enabledCaolán McNamara1-1/+1
Change-Id: I0a135236cf5e5f291b6289cc76228290a6f77e98 Reviewed-on: https://gerrit.libreoffice.org/78406 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-09-02loplugin:constmethod in editengNoel Grandin14-28/+28
Change-Id: I07e22d880940ea6df928565942dac268f4b94fea Reviewed-on: https://gerrit.libreoffice.org/78399 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-31drop some unnecessary includesCaolán McNamara1-2/+0
Change-Id: I1abef2c2318e83aa8045d2b4763e74f45b4755e5 Reviewed-on: https://gerrit.libreoffice.org/78347 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-28ContentInfo::Equals uses std::equalAdrien Ollier1-18/+10
Change-Id: Ia99cd1cb9594d6398ff351f6ded7888a75c83dd6 Signed-off-by: Adrien Ollier <adr.ollier@hotmail.fr> Reviewed-on: https://gerrit.libreoffice.org/76504 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>