summaryrefslogtreecommitdiff
path: root/editeng
AgeCommit message (Collapse)Author
2019-06-23editeng/XParaPortionList: OutputDevice's MapModeAdrien Ollier
Change-Id: I77098fd15e131711e4f2a7ef4f21bd1dd8d68768 Signed-off-by: Adrien Ollier <adr.ollier@hotmail.fr> Reviewed-on: https://gerrit.libreoffice.org/72307 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.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-20InvalidateAtWindow should be preferredCaolán McNamara
it already call GetWindow()->Invalidate(aClipRect) internally for the usual case, and correctly calls EditViewInvalidate when the editview is not used in a vcl::Window Change-Id: I9f985cb91bc768b410838289efc994d9a5b249d4 Reviewed-on: https://gerrit.libreoffice.org/74421 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-20fix crash with non-window outputdevice betterCaolán McNamara
Change-Id: I93511574f8ab7d564baf1f031d54ca0e72ca345e Reviewed-on: https://gerrit.libreoffice.org/74380 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-19InvalidateWindow should be preferredCaolán McNamara
it already call View::GetWindow()->Invalidate internally for the usual case, and correctly calls EditViewInvalidate when the editview is not used in a vcl::Window Change-Id: Ic83150117a8738ce5c6f34875057fd743bdb173a Reviewed-on: https://gerrit.libreoffice.org/74365 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-19allow copy/paste when not hosted in vcl::WindowCaolán McNamara
Change-Id: I1b30cb700461fa66192a4b86bf577d1babc76cb7 Reviewed-on: https://gerrit.libreoffice.org/74353 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-18fix crash in header/footer calc dialogCaolán McNamara
cut and paste can happen when the EditView isn't in a vcl::Window Change-Id: I9fdbfe28c5ca5dd680b821ff8ce4e0133ab203aa Reviewed-on: https://gerrit.libreoffice.org/74279 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-17Add comphelper::getUnoTunnelImplementation templateArkadiy Illarionov
Use it instead of classname::getImplementation from UNO3_GETIMPLEMENTATION_* Change-Id: Ifcc8cfcd6369c576250008c76ce31ba79ea3a596 Reviewed-on: https://gerrit.libreoffice.org/74107 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.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-06-12Resolves: tdf#125866 null-derefCaolán McNamara
Change-Id: I0bd597498d10130928de5d7865219fe6f4bc8bcd Reviewed-on: https://gerrit.libreoffice.org/73880 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-12Move isIVSSelector, isCJKIVSCharacter to i18nutil/unicode.hxxStephan Bergmann
6a7db071c75609093fc3a9cbc297b8069726a33e "tdf#125497 allow backspace to remove CJK IVS" had moved these functions from sw/source/uibase/wrtsh/delete.cxx to rtl/character.hxx, but the latter appears to be a less than ideal home for them: For one, it is part of the stable URE interface, which makes it harder to maintain (e.g., later versions of Unicode have added CJK Extension C--F code blocks, which the current implementation of isCJKIVSCharacter does not reflect). And for another, besides details of legacy/ubiquitous ASCII, it only deals with the "hard" structure of Unicode (isUnicodeCodePoint, isSurrogate, etc.), not with any specific code blocks or character classifications (which can change over time). Internal i18nutil/unicode.hxx appears to be better suited. Change-Id: I88b3e4e2488411f988c1a20f79b8a58626d93dce Reviewed-on: https://gerrit.libreoffice.org/73873 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-12loplugin:unusedmethodsNoel Grandin
Change-Id: I42667e8483d2cb4363227344faca3899bd95d424 Reviewed-on: https://gerrit.libreoffice.org/73824 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-12Revert "improve empty tools::Rectangle (width)"Noel Grandin
This reverts commit a46a257794f1f53b294735fc876c394be23a3811. Too many issues, I'm going to try landing this in smaller pieces to make it easier to fix regressions Change-Id: Ie5e8979838017af86c119c887b580385ba068d54 Reviewed-on: https://gerrit.libreoffice.org/73859 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-07improve empty tools::Rectangle (width)Noel Grandin
This is the width part, the height part will come next. Instead of storing "empty" as a special value (which is easy to get wrong, eg. some image filters pass in that special value, expecting it to be a valid width), just use separate boolean values for width and height empty. Also lots of code was calling GetBottom() or GetRight() on an empty rectangle, getting back that magic value and doing calculations on it, resulting in completely bogus data. So (1) make the various Rectangle methods do something reasonable when the empty flags are set (2) fix various other code to handle empty better (3) assert when code accesses Bottom or Right and the empty flag is set. Change-Id: I1163378cd2773dd8b386210f83400bb6b4701069 Reviewed-on: https://gerrit.libreoffice.org/73564 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-07tdf#42949 Fix IWYU warnings in svl/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Except source/svdde/* which is WIN-specific Also recheck include/svl Change-Id: I32d3bcb6b14665c56c07a2f10526329b08c64cbe Reviewed-on: https://gerrit.libreoffice.org/73630 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-06-01weld SvxThesaurusDialogCaolán McNamara
Change-Id: I09a7b4dcd43af061d0e4be42a7b6a2ebf2331d0d Reviewed-on: https://gerrit.libreoffice.org/73282 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
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-30tdf#125497 allow backspace to remove CJK IVS.Mark Hung
Japanese users prefer to remove a CJK IVS character when pressing the backspace instead of removing the selector part of IVS. Change-Id: I4313d69ed52d82c5a7e4e4823b1da06f1d90bdad Reviewed-on: https://gerrit.libreoffice.org/72971 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2019-05-29tdf#120412 DOCX filter: fix missing superscriptJozsef Szakacs
by editeng support of large superscript raising. Maximal raising of superscript text is 1584 pt in MSO, while LibreOffice didn't import the values greater than 100% of the current font height. Using the maximal percent value of the default 11 pt font, the limit is 14400% now, fixing most of the import problems. Greater raisings will be limited to 14400% during the DOCX import. Note: the standard doesn't limit the bigger percent values, see "20.374 style:text-position" and "18.3.23 percent" in OpenDocument 1.2. Change-Id: I3d0d08f273f2067180f74fba40c47d62364fcc59 Reviewed-on: https://gerrit.libreoffice.org/69164 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-05-28Add comment about this "weird assignment" in editdocJulien Nabet
See http://document-foundation-mail-archive.969070.n3.nabble.com/Fishy-assignment-in-editdoc-editeng-td4262109.html Remove the previous comment less clear Change-Id: I06b0bc3254068d58146d9582c2b69afbadbe56ee Reviewed-on: https://gerrit.libreoffice.org/73062 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2019-05-23tdf#125297 List Format wrongly applied to text pastedNoel Grandin
regression from commit f4ea84ff370d33a02a8fb1d6405b9d964491258e Date: Thu Apr 25 16:35:14 2019 +0200 tdf#119650 slow saving spreadsheet with comments, part 1 Change-Id: I91b3c009fb8b6739e98537de227ab563828b9c80 Reviewed-on: https://gerrit.libreoffice.org/72842 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-22New loplugin:dataStephan Bergmann
...following up on 1453c2c8f13bac64ecd1981af7cebf1c421808ac "prefer vector::data to &vector[0]" Change-Id: I7c113747d92d144a521d49b89384dd8bf1215c01 Reviewed-on: https://gerrit.libreoffice.org/72765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-22Spell out element access explicitly in test codeStephan Bergmann
...to avoid the upcoming loplugin:data asking to replace just each initial &aAttrs[0] with aAttrs.begin() and leave the remaining &aAttrs[N] alone, which would make the results look odd. Change-Id: I7d5c76e9d4fc6c7fa13cb28fca5ea65ea2d0f77e Reviewed-on: https://gerrit.libreoffice.org/72764 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-22Fix typoAndrea Gelmini
Change-Id: I3bb52201d523fd1c97315c99ce58e4473f971a12 Reviewed-on: https://gerrit.libreoffice.org/72699 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-22Fix typoAndrea Gelmini
Change-Id: I8d0eb79c1848714c637d05064b6aae5140843c20 Reviewed-on: https://gerrit.libreoffice.org/72707 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
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-05-22Fix typoAndrea Gelmini
Change-Id: I97909d9d6ece176f519318ebb53b4cdfeeba9146 Reviewed-on: https://gerrit.libreoffice.org/72709 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-22Fix typoAndrea Gelmini
Change-Id: I09c624e4def7a0a3f0a753f9f325b4863dceac0e Reviewed-on: https://gerrit.libreoffice.org/72706 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-22Fix typoAndrea Gelmini
Change-Id: Ib28c9a3df6b6d6b6f65e2c9b0810655b963eb1ff Reviewed-on: https://gerrit.libreoffice.org/72711 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-21Fix typoAndrea Gelmini
Change-Id: I2c4fcfee1ee9901297acebc11a7698633c3c21ef Reviewed-on: https://gerrit.libreoffice.org/72696 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-21Fix typoAndrea Gelmini
Change-Id: I5f062a2d3260110b1108dd28c8a536652416acf2 Reviewed-on: https://gerrit.libreoffice.org/72692 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-21Fix typoAndrea Gelmini
Change-Id: I9adff89a575fce0db2b64df73f3ddc90867da408 Reviewed-on: https://gerrit.libreoffice.org/72694 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-15tdf#90297 set default SmEditWindow backgroundJan-Marek Glogowski
This implements ApplySetting for the proper background of the undocked SfxDockingWindow. In addition, like all other code, this sets the text color via the EditEngine font objects and therefore reverts the uneeded EditEngine interface from the original commit ea191cf9807d ("tdf#90297 use field colors for math's edit engine"). Change-Id: Ib7df4ce730da92a1e41f58b8348a5aec18208166 Reviewed-on: https://gerrit.libreoffice.org/72312 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-05-14tdf#90297 use field colors for math's edit engineJan-Marek Glogowski
This adds a maTextColor to the EditEngine, which will override the default AutoColor. There is also a NOCOLORS mode and I thought about using it instead, but it defaults to COL_BLACK and overriding this seems wrong. Since the EditEngine does the whole drawing and now has the explicit FieldColor() and FieldTextColor() for background and text, my guess is we don't need an ApplySettings implementation. Change-Id: I6c2ecc843a3e07de98f97c86fc00a3b83cb78d97 Reviewed-on: https://gerrit.libreoffice.org/72197 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-05-12regenerate PCH headersLuboš Luňák
Change-Id: I4894023e42cbfa32916ee3ddfb2cfb5426cfc69f Reviewed-on: https://gerrit.libreoffice.org/72195 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-05-10handle empty tools::Rectangle in editengNoel Grandin
Change-Id: Ie59a7ee3b95eafe2a2f743a76f8feb993c0c3daa Reviewed-on: https://gerrit.libreoffice.org/72110 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-09regenerate PCH headers for the 4 new levelsLuboš Luňák
Plus some build fixes triggered by this. Change-Id: I59b21def706598ceffd45ae5b1f0262ec9c1ad50 Reviewed-on: https://gerrit.libreoffice.org/71581 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-05-09avoid copying when placing items into SfxItemSetNoel Grandin
Change-Id: I05c627f590e7794c1ba11b66021dc30aa3285eb0 Reviewed-on: https://gerrit.libreoffice.org/71941 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-07tdf#74702 partial cleanup of OutDevTypeAdrien Ollier
XParaPortionList::RefDevIsVirtual() does not depend on eRefDevType Change-Id: I22182bbe26502552125d24aa1a8c33ffb5a38971 Signed-off-by: Adrien Ollier <adr.ollier@hotmail.fr> Reviewed-on: https://gerrit.libreoffice.org/71649 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
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-30drop Graphic::operator boolNoel Grandin
which tends to interact in very weird ways with other code, for example it makes Graphic appear to have an operator< Change-Id: I335fe8f3644b710bc61291e625cbca7334a37716 Reviewed-on: https://gerrit.libreoffice.org/71532 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-04-27Decouple reading/writing of Color into GenericTypeSerializerTomaž Vajngerl
This adds GenericTypeSerializer, which is now responsible of serializing the Color into a stream (other types will follow), but only for the older version of the binary format. The new version we just write the sal_UInt32 mValue directly. This is a start of decoupling the serialization of generic types in tools and vcl module from the actual type, so we can in the future replace those with basegfx variant. Change-Id: I92738e7c178cac5cbca882dcbe45c80cc8269466 Reviewed-on: https://gerrit.libreoffice.org/71404 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-04-26Removed executions flags on source filesAndrea Gelmini
Change-Id: I165d417a8e28d5732945722158b83e2ac5edb402 Reviewed-on: https://gerrit.libreoffice.org/71388 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-26ofz#13491 SvxRTFItemStackType dtor excessive recurse depthCaolán McNamara
ofz#13491 SvxRTFItemStackType dtor recursively calls the dtor of its m_pChildList. The recurse depth can grow sufficiently to trigger asan. So breadth-first iterate through the nodes and make a flat vector of them which can be iterated through in order of most distant from root first and release their children linearly Change-Id: Icc7d7130935a27595dae7b55cea41c6a53aed956 Reviewed-on: https://gerrit.libreoffice.org/71386 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-26tdf#119650 slow saving spreadsheet with comments, part 1Noel Grandin
Reducing the number of times the editeng needs to reformat text takes saving from from 278s to 151s Change-Id: I32ba0ab65b4dc0f268cc2cda802570673a316ea0 Reviewed-on: https://gerrit.libreoffice.org/71358 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-25WIP: Further preparations for deeper Item changesArmin Le Grand
(1) Migrated all still existing binary load/save stuff in SfxPoolItem to legacy files. Isolated from Item implementations. Adapted all usages. No more methods Create/Store needed, also GetVersion removed (2) Removed operator= for SfxPoolItem. Adapted all usages. Goal ist to handle Items more as Objects ('Object-Oriented') in the sense to move/handle instances, not to copy one instance over another one (which is more and more problematic with hard to copy content as UNO API stuff or similar). This lead to much more usages of std::shared_ptr which correlates well with future plans fr Items (see dev branch). Next logic step will be to also remove copy constructor Linux build and corrections done Fixed Writer test and removed unused defines Fixed another unused m,acro Started to unify the AutoFormat stuff Changes to OUString constructor usages, tests completely No idea why, but SfxStringItem constructor which takes a OUString& now insists of not getting ::OUString's handed in - changed all 'SfxStringItem.*OUString.*".*"' accordingly Change-Id: Ibed7358b18fb019994a7490332b9d797a6694c29 Reviewed-on: https://gerrit.libreoffice.org/71075 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2019-04-24Fix typosAndrea Gelmini
Change-Id: I9cc5e13681b047fe772704b42796e210ad070601 Reviewed-on: https://gerrit.libreoffice.org/71148 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
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-20simplify SfxPoolItemArray_Impl (tdf#81765 related)Noel Grandin
Since we want to look up items by pointer, just store them in a std::unordered_set, which allows fast find(). This dramatically simplifies most operations on this data structure. Fix a dodgy sd test that was relying on items with the same whichid being in the pool being in a certain order. Change-Id: I4d79fc718f95e3083a20788be1050fbe9fca7263 Reviewed-on: https://gerrit.libreoffice.org/70881 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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>