summaryrefslogtreecommitdiff
path: root/editeng/source/misc
AgeCommit message (Collapse)Author
2019-12-31tdf#59666 AutoCorrect: don't capitalize single Greek lettersLászló Németh
in automatic sentence capitalization (except in Greek texts), to keep the requested lower case scientific and mathematical symbols. Change-Id: I0c658bb69fb90e7159665939f85f1fd99477c730 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85955 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 04ef45a6dd7692c6ee08769c4ac4a0e92a0b64b8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86042 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-12-31tdf#38394 AutoCorrect: fix ’« in French l’« word »László Németh
instead of using the bad ’" -> ’» autocorrection. Change-Id: I48adbb2e8ca8e786c7835ff186d4580e856cf3c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85945 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 8039c9eb27170a162830f0ecd2086010a7a5858f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85951
2019-12-29tdf#54409 fix AutoCorrect with Unicode quotation marksLászló Németh
Now single or double typographical quotation marks don't break automatic correction of the quoted words. For example, ‘acn -> ‘can, acn’ -> can’, “acn” -> “can”. Change-Id: I7f895414be4c3bbc9a3914df83d93cf28b4311a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85812 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 0d52da4637b563c175cd21d04a639160441436ef) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85930 Tested-by: Jenkins
2019-12-21tdf#106164 AutoCorrect: capitalize words with apostropheLászló Németh
at sentence starting position, for example we’re -> We’re This worked only with ASCII apostrophe ('), and changing to default usage of typographical apostrophe (U+2019) broke this kind of capitalization from commit e6fade1ce133039d28369751b77ac8faff6e40cb (tdf#38395 enable smart apostrophe replacement by default). Change-Id: If582194364f77cfb9fc0f04a28ac79a08bb804ff Reviewed-on: https://gerrit.libreoffice.org/85630 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit f6cf80c81043d84606a5b5f7d93ae958307a16d3) Reviewed-on: https://gerrit.libreoffice.org/85660
2019-12-06tdf#128666 Only enable hyperlink actions when just the field is selectedSamuel Mehrbrodt
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 Grandin
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-10-31avoid intermediate vcl::WindowsCaolán McNamara
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 McNamara
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-16Resolves: tdf#127961 Add NBSP to quotation marks for all French except fr-CHEike Rathke
Change-Id: I71e8377bf44c2db5ef291d2990528ec16aaf3b44 Reviewed-on: https://gerrit.libreoffice.org/80909 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-10-08tdf#128009: Allow spaces in AutoText suggestionsMike Kaganski
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-07InsertQuote can be constMike Kaganski
Change-Id: I57b50e72b68b71406d1745304d24b52d75b3d082 Reviewed-on: https://gerrit.libreoffice.org/80342 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-10-04SvxAutoCorrect::GetPrevAutoCorrWord should not be constMike Kaganski
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 Grandin
Change-Id: If0df5216dccd2c0a7aa790668471993f5d4d5d32 Reviewed-on: https://gerrit.libreoffice.org/80183 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-29constmethod for accessor-type methodsNoel Grandin
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 Grandin
Change-Id: I72f9cf62f9daeaed5108ede41dd41544204a9745 Reviewed-on: https://gerrit.libreoffice.org/79643 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-20tdf#109158 improve load time of autocorrect XML fileNoel Grandin
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 Grandin
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-03Resolves: tdf#126935 a11y for hosted EditEngineCaolán McNamara
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-02loplugin:constmethod in editengNoel Grandin
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 McNamara
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-12Don't select hyperlink fields arbitrarilySamuel Mehrbrodt
For some functions, like remove or edit hyperlink, it's required that the hyperlink field is selected. However, we should do that only when executing the function, not when queriying its status. This led to selection changes on mouse over/right click. Change-Id: I22035698032d1e651aae6a74d6e445dfe044bf74 Reviewed-on: https://gerrit.libreoffice.org/77336 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-08-06tdf#126369 Invalidate edit view after removing hyperlinkSamuel Mehrbrodt
Change-Id: I715c0de52a7eb27e8eb3848d99006addf0b90695 Reviewed-on: https://gerrit.libreoffice.org/76982 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-07-19loplugin:referencecasting in editengNoel Grandin
Change-Id: I584266ba58e55e6435e76180227c0a5756aa0c23 Reviewed-on: https://gerrit.libreoffice.org/75950 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-15tdf#112543 Add Edit/Remove hyperlink to text boxes/shapes in WriterSamuel Mehrbrodt
Change-Id: I9052387cf39135c2324b9db03662dc0365323400 Reviewed-on: https://gerrit.libreoffice.org/75479 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-07-12Move remove url code to editengSamuel Mehrbrodt
so that the code can be reused by sc and sw Change-Id: I0d3c778c7bb7847fcf690d0e76994afdd0645285 Reviewed-on: https://gerrit.libreoffice.org/75477 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-06-25use common WeldEditViewCaolán McNamara
Change-Id: I873cb64a167027030c9eeef61344e6f6f885a924 Reviewed-on: https://gerrit.libreoffice.org/74705 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-25factor out to a common WeldEditViewCaolán McNamara
Change-Id: Ife7b6f57c80d310bd11a8ed89e36fdc99742d158 Reviewed-on: https://gerrit.libreoffice.org/74698 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-21Drop INetURLObject::GetName and INetURLObject::GetExtensionMike Kaganski
They are just synonyms for GetLastName and GetFileExtension resp. Change-Id: Ic498c7025cc421b830394ed94d64529fd74fe7dd Reviewed-on: https://gerrit.libreoffice.org/74448 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-06-15loplugin:logexceptionnicely in editeng..extensionsNoel Grandin
Change-Id: I50b9d7e92ef057c985d0d6e76dfeb62591d404f6 Reviewed-on: https://gerrit.libreoffice.org/74047 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-31Use hasElements to check Sequence emptiness in [e-i]*Arkadiy Illarionov
Similar to clang-tidy readability-container-size-empty Change-Id: I79e31919db8f4132216f09a7868d18835eeb154b Reviewed-on: https://gerrit.libreoffice.org/71795 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-22Fix typoAndrea Gelmini
Change-Id: I88e2a10836ae961764d899b8d74fd707a3e15b2c Reviewed-on: https://gerrit.libreoffice.org/72708 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-30improve loplugin:stringconstantNoel Grandin
to find more places we can elide the OUString() constructor at call sites Change-Id: Ie09f3c61f2c4b4959c97dc98ebcbaf7c51d5d713 Reviewed-on: https://gerrit.libreoffice.org/71514 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-23tdf#42949 Fix IWYU warnings in include/editeng/[f-x]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ic14d2e66434817bcb7bd1e2b707f81d720d596b6 Reviewed-on: https://gerrit.libreoffice.org/71007 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-15tdf#42949 Fix IWYU warnings in include/editeng/[a-e]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I81917d697adf79b1bd0de4cc262d3cd6bc8eb36f Reviewed-on: https://gerrit.libreoffice.org/70710 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-15improve loplugin simplifyconstructNoel Grandin
to find stuff like OUString s = OUString("xxx") Change-Id: Ie7ed074c1ae012734c67a2a89c564c1900a4ab04 Reviewed-on: https://gerrit.libreoffice.org/70697 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-13loplugin:sequentialassign in editeng..extensionsNoel Grandin
Change-Id: I95c6fb5e2ddc1c2d8a2fb1d5ff30b18ddad48b3a Reviewed-on: https://gerrit.libreoffice.org/70699 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-02tdf#108423 autocorrect English word i' -> I’László Németh
Now correction of the ASCII quotation mark to the typographical one (’) capitalizes the preceding single lowercase i, too, as in MSO, if the language of the text is English. Change-Id: Ic7586f07aa13f441e25494ff4cc11c672ac4a67a Reviewed-on: https://gerrit.libreoffice.org/70088 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-03-31tdf#120703 PVS: remove redundant static castsMike Kaganski
V572 It is odd that the object which was created using 'new' operator is immediately cast to another type. Change-Id: I54976062dc3f62eaaa79f89eff54454f0b24ac2c Reviewed-on: https://gerrit.libreoffice.org/69989 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-07tdf#121686: fix assert in SvxAutoCorrect::FnChgToEnEmDash (editeng)Julien Nabet
See https://bugs.documentfoundation.org/attachment.cgi?id=149773 Change-Id: I1696984a8df1b38a359a8177a5f3670526d2696e Reviewed-on: https://gerrit.libreoffice.org/68832 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-03-05re-land "new loplugin typedefparam""Noel Grandin
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-23loplugin:unusedfields in editengNoel Grandin
Change-Id: Ic237f67cb48d8894227805904fbba3b7865b2358 Reviewed-on: https://gerrit.libreoffice.org/68230 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-21weld HangulHanjaConversionDialogCaolán McNamara
Change-Id: Ia41f1a03581a0a48d59706ac5b3c569fc39c7f4d Reviewed-on: https://gerrit.libreoffice.org/68099 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-20drop unused argumentCaolán McNamara
Change-Id: I5d229a0afb822c9e7b81d3d8f27962c52d27d815 Reviewed-on: https://gerrit.libreoffice.org/68094 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-08loplugin:indentation in editeng..extensionsNoel Grandin
Change-Id: If7d7c400fb5d24e48b6cd02b364a8ac7fa23505d Reviewed-on: https://gerrit.libreoffice.org/67538 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-29Add comments to autocorrect functionsIlmari Lauhakangas
It was difficult to find the sentence capitalization function. I thought it would be a good idea to add the UI strings of the options as comments before the function blocks. Also added a couple of notes inside FnCapitalStartSentence. Change-Id: I7047b199193ee0b61ba7fd955411952aae33ab41 Reviewed-on: https://gerrit.libreoffice.org/66812 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-01-22tdf#42949 Fix IWYU warnings in include/xmloff/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Id20e0bc42e39f868a7c5d49d756f2ad5e14a86c0 Reviewed-on: https://gerrit.libreoffice.org/66637 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-11Replace OUStringBuffer::appendCopy with append(std::u16string_view)Stephan Bergmann
...which is more general Change-Id: I94f28f8eda887120cf5f143b4549e0339b60e6a7 Reviewed-on: https://gerrit.libreoffice.org/66155 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-07tdf#42949 Fix IWYU warnings in include/vcl/[v-x]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I98f49765c6b74808dcbd692e0f375dd2848fcfd4 Reviewed-on: https://gerrit.libreoffice.org/65614 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-10tdf#42949 Fix IWYU warnings in include/vcl/s*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie87d27dd2c385a63349e0b322fd067ba03d2d152 Reviewed-on: https://gerrit.libreoffice.org/64479 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-07tdf#121779: extend TWo CApitals list to also ignore sMALL iNITIALSMike Kaganski
Now this list is used also in rules for capitalizing first letter of every sentence, and for correcting accidental use of Caps Lock key. Change-Id: I4fbdbccbae32743d5e9a6757344361eefd88e167 Reviewed-on: https://gerrit.libreoffice.org/64759 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com> Reviewed-by: Sophie Gautier <gautier.sophie@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>