summaryrefslogtreecommitdiff
path: root/editeng
AgeCommit message (Collapse)Author
2020-07-16compact namespace: editeng-filterNoel Grandin
Change-Id: I240bff8de9489d3c0c9c9be6b31ce7e15661bff8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98922 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-14tdf#134478 Refactor dumping of EditEngine dataJan-Marek Glogowski
- document key combinations in README - dump data into workdir as editenginedump.log - move as static function into EditEngine class - get rid of the EditDbg class and editdbg.hxx Change-Id: I965f0143a9a275a289b202f54c0ea65da63c52f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97873 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-07-11cid#1465259 silence Arguments in wrong orderCaolán McNamara
Change-Id: I67e82a3ec9128a486ef882f803c900b7c94a4529 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98573 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-10lokit: editeng: Use 'special-positioning' data for selectionsDennis Francis
For Calc, this means the LOK clients get selection rectangle coordinates in print-twips when special positioning is enabled. Change-Id: Ib26341f888cedcde2e2755ea57be0623884bb097 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98132 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2020-07-10replace usage of blacklist with excludelist for IWYUThorsten Behrens
Background and motivation: https://tools.ietf.org/html/draft-knodel-terminology-02 Change-Id: I2f22d455d2a936a85750eaab1fda215ebb6d9d48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98182 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-09scPrintTwipsMsgs: Use top-left of output-area as the refpointDennis Francis
We can't use the transformed version of editeng origin, since it need not be in client view area depending on text alignment, which is unusable as far as the clients are concerned. Top-left corner of output-area is always guaranteed to be in client view area independent of text-alignment settings. Change-Id: I5bd20d2b52e146371de4b605bf7934b7e7d6fc5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98131 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2020-07-09lokit: Avoid sending wrong edit-cursor/selection messages when...Dennis Francis
the EditView's output-area needs to be tweaked temporarily to render it to a tile which is meant for another view. Change-Id: I2b8fc1986c247ce65c18ea64e3b43d25625c7e9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98129 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2020-07-08scPrintTwipsMsgs: Use print-twips paper-sizeDennis Francis
Paper size for the EditEngine is calculated based on per-cell pixel alignment. So lets use the exact print-twips version whenever we need it to compute/adjust output-area and visible-area of EditView. Change-Id: I7da6db9363d09965315ff5ca9d01f0fea141a533 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98130 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2020-07-07Typo: pargraph->paragraphJulien Nabet
Change-Id: I7749951d829eb8aaeacdca0fd66d41cf9d6a1613 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98251 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-07-07lokit: editeng: Use 'special-positioning' data...Dennis Francis
for computing edit-cursor messages if available. For Calc, this means the LOK clients get edit-cursor coordinates in print-twips. Change-Id: Ib11f3653e626ba8db7ddbc9bc2b4e071de7b705e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98121 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2020-07-07Introduce LOK 'special positioning' methods to EditViewDennis Francis
This is meant for Calc. In Calc, all positions in twips are computed by doing independent pixel-alignment for each cell's size. To allow print-twips coordinates in LOK messages specific to EditView, this patch introduces new methods to set/update both 'output-area' and 'visible-doc-position' in print twips coordinates, which are stored separately. Change-Id: Id165966c970fa26c79d583f435dccd62c7eb1f0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98120 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2020-07-05tdf#133524 AutoCorrect: fix Romanian nested quotationsLászló Németh
typing " inside primary quotation marks: use the correct order of the double angle quotes: „... «quote» ...” Add also Aragonese, Asturian and Catalan to the "<<" and ">>" replacement. See commit 57f07b1d7378d218648667c5b1315cc8ad905875 (tdf#133524 AutoCorrect: support double angle quotes). Change-Id: I2e80cc45768eefa3eb62b446ca822ee6c46f7242 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97970 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-03avoid some sortingNoel Grandin
Change-Id: I02aacffcac30d48f79fd8d2640392aa3f1214b41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97826 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-01Upcoming improved loplugin:staticanonymous -> redundantstatic: editengStephan Bergmann
Change-Id: Ic5294dc53b1a7b6c654619cde8ef5133c222ae1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97558 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-29loplugin:constantparamNoel Grandin
Change-Id: I54f0e2864cb4ef00fea8f9e4369a1f76721e7503 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97369 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-27AutoCorrect: fix redundant loadingLászló Németh
of new localized options added by commit da64ec8c8a91db6a6ec9657898f081d5ee67e739 (tdf#133589 AutoCorrect: transliterate to Old Hungarian) and commit 77b213890a96d144d9cfacdfd35ac0bba68b9f7a (tdf#133524 add option to angle quote AutoCorrect) Change-Id: I39f97cfc5a9deb7cbe92d175b2e59ba2ab8a2707 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97266 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-06-26Upcoming improved loplugin:elidestringvar: editengStephan Bergmann
Change-Id: I8181697f608f8472482905b21328744fe7909349 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97196 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-26tdf#123786 AutoCorrect: fix apostrophe in RussianLászló Németh
and Ukrainian at "Single quotes" replacement outside of second level quotations. For example: „quote' -> „quote‘ but now apostrophe' -> apostrophe’ instead of the bad apostrophe' -> apostrophe“ Change-Id: Iad69b7f88ab9677f25ee0f806d035e16cdebe29b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97096 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-06-26tdf#133524 AutoCorrect angle quotes for fr-CH and gl-ESLászló Németh
Note: << and >> replaced with single angle quotation mark ‹ and › in Swiss French, according to the apostrophe related changes in tdf#116062, see commit b9910e87de4eea1cb3684bb7af8e58d681cbe809 (Resolves: tdf#116062 revert [fr-CH] to use previous single quote characters) Change-Id: I84c54b7c12d2b3a2a53e4daf876bfba11985fdea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97095 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-06-26tdf#133524 add option to angle quote AutoCorrectLászló Németh
in Localized Options page of AutoCorrect Options dialog window: [x] Replace << and >> with angle quotes Note: this is optional part of Double Quotes replacement. Change-Id: Ib0c7e8837a89c3772c5db76720811d440e62183a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97094 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-06-24Remove obsolete comments about '\r' on old Mac OSStephan Bergmann
(and where sticking to numeric '\x0D' is probably cleaner anyway) Change-Id: I614c57a4de74bf688c498e9bff043ca2eee04cb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97033 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-14Fix typoAndrea Gelmini
Change-Id: I9384c03d9e616ac94256d679e3d545afe6794360 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95257 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-06-03Upcoming loplugin:elidestringvar: editengStephan Bergmann
Change-Id: Ia14a1391cbc40b98d24e37c3a54b16871441fc78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95399 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-02tdf#132301 AutoCorrect: fix ’« in French qu’« word »László Németh
instead of using the bad ’" -> ’» autocorrection. Also limit this for abbreviated single-letter form of French words ce, de, je, la, le, ne, me, te, se and si. See commit 8039c9eb27170a162830f0ecd2086010a7a5858f (tdf#38394 AutoCorrect: fix ’« in French l’« word »). Change-Id: I1761365d90ae3af3c9ab47a3a82bf0abbe1b32be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95345 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-06-02tdf#133589 AutoCorrect: transliterate to Old HungarianLászló Németh
In right-to-left paragraph mode, transliterate Hungarian text word by word during typing, also add the associated checkbox to Localized Options page of AutoCorrect dialog window. Old Hungarian (ISO 15924: Hung) is a historical and renewed script which is still in use to transliterate Hungarian writing. As a localized AutoCorrect feature, the patch supports the followings: – word-by-word transliteration of Hungarian texts only in right-to-left paragraph mode. – consonant disambiguation of digraphs and trigraphs based on hyphenation (now pattern-based Huhyphn dictionary of libhyphen, planned dictionary based Hunspell later) – transliteration by extended hu-Hung module of Numbertext library. Note: transliteration of the selected text using AutoCorrect Apply function has't been implemented, yet. Change-Id: Iee0f18e2485c974c35acf0a3abc3a49c2cf80196 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95303 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-05-31tdf#128860 AutoCorrect: fix apostrophe in Czech, German,László Németh
Icelandic, Slovak and Slovene at "Single quotes" replacement outside of second level quotations. For example: ‚quote' -> ‚quote‘ but now apostrophe' -> apostrophe’ instead of the bad apostrophe' -> apostrophe‘ Change-Id: Ie6d367639cb80ec9f11e4d824b87f537e5285182 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95213 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-05-31tdf#133524 AutoCorrect: support double angle quotesLászló Németh
Add two methods to support double angle quotes, as part of "Double quotes" replacement: 1. Correct ">>" and "<<" to » and « in several languages, where double angle quotes are default or alternative primary or second level quotation marks, but actual LibreOffice locale settings don't contain double angle quotes. 2. Correct " to double angle quotes, if the cursor is there in a primary level quotation (i.e. there is a preceding primary level opening quote, but not other quotes). For example, it's possible to type Hungarian or Romanian quotation marks in „... »quote« ...” pressing only Shift + 2 (") for them. (These languages, where "Single quotes" replacement is used for apostrophe and third level quotes instead of the standard second level quotation marks.) Change-Id: Icd1584a5a2b81422de693217d2d1f7f3058a74b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95212 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-05-31AutoCorrect: clean-up InsertQuoteLászló Németh
Change-Id: I577115805e5bcc29f6eb4d853aaa523495f30126 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95211 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-05-29loplugin:simplifybool in dbaccess..frameworkNoel Grandin
Change-Id: I0d73bb7d8d3fde426edc0a10c0750758b68aceb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95099 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-29improve pahole script and pack a few classesNoel Grandin
(*) fix: I was substracting the padding space instead of adding it when calculating how much free space we had to improve. (*) sort input data, so we process structs located in the same DSO together, which reduces GDB's memory usage (*) handle another error condition, where gdbs output is sufficiently mixed up that we miss the end of commands terminator Change-Id: Ic4bb92b736f38a2b3d90e4a14485152b7f869b43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95041 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-20use for-range on Sequence in e*Noel Grandin
Change-Id: I77dc12356ee45b1dee9acaf8a73dea81588822d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94554 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-18Resolves: tdf#129620 crash because there is no associated windowCaolán McNamara
only an outputdevice in this editeng-in-a-widget case Change-Id: Idf054872a48befba652012cd511e4f9df4437166 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94415 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-13Related tdf#132945: fix warningJulien Nabet
I noticed this log: warn:sw.uno:555419:555419:sw/source/core/unocore/unostyle.cxx:2303: error getting attribute from RES_BACKGROUND Git history provides: https://cgit.freedesktop.org/libreoffice/core/commit/?id=7a8ed362eb163ac15a000ba1cfc74b58315800a1 [API CHANGE] revert and deprecate *BackGraphicURL add *BackGraphic *BackGraphicURL include the following properties: - BackGraphicURL - FooterBackGraphicURL - HeaderBackGraphicURL - ParaBackGraphicURL This were removed, but for backwards compatibility this commit adds them back again and depreactes them in the UNO API. The behaviour also changes as internal vnd.sun.star.GraphicObject scheme URLs aren't supported so this properties can only be set and only if a external URL is provided. If getting such a property then a RuntimeException will be thrown. But why "MID_GRAPHIC_URL" wouldn't be dealt in SvxBrushItem::QueryValue whereas: 1) we got this code 2892 case MID_GRAPHIC: 2893 { 2894 uno::Reference<graphic::XGraphic> xGraphic; 2895 if (!maStrLink.isEmpty()) 2896 { 2897 Graphic aGraphic(vcl::graphic::loadFromURL(maStrLink)); 2898 xGraphic = aGraphic.GetXGraphic(); 2899 } 2900 else if (xGraphicObject) 2901 { 2902 xGraphic = xGraphicObject->GetGraphic().GetXGraphic(); 2903 } 2904 rVal <<= xGraphic; 2905 } => so dealt in 2895 "if" block See https://opengrok.libreoffice.org/xref/core/editeng/source/items/frmitems.cxx?r=e12fa18c#2892 2) MID_GRAPHIC_URL is dealt in SvxBrushItem::PutValue 2974 case MID_GRAPHIC_URL: 2975 case MID_GRAPHIC: 2976 { 2977 Graphic aGraphic; 2978 2979 if (rVal.getValueType() == ::cppu::UnoType<OUString>::get()) 2980 { 2981 OUString aURL = rVal.get<OUString>(); 2982 aGraphic = vcl::graphic::loadFromURL(aURL); 2983 } 2984 else if (rVal.getValueType() == cppu::UnoType<graphic::XGraphic>::get()) 2985 { 2986 auto xGraphic = rVal.get<uno::Reference<graphic::XGraphic>>(); 2987 aGraphic = Graphic(xGraphic); 2988 } ... See https://opengrok.libreoffice.org/xref/core/editeng/source/items/frmitems.cxx?r=e12fa18c#2974 Change-Id: I3ad42c4343d9875647cc8f01504da91b68fe220f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94010 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-10new loplugin:simplifypointertoboolNoel Grandin
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-10lok: calc: formula bar: improve selection handlingMarco Cecchetti
This patch provides some improvements for the single input line case with a multi-line text selection: - selection rectangles are correct when selection is expanded to the previous or the next line - two flag parameters for notifying the client if the start/end selection handles should be visible or they don't Change-Id: Ica0428786183c4b5a15870c43490bc69452c2a49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92121 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93344 Tested-by: Jenkins
2020-05-10lok: set device form factor of the client on view creationMarco Cecchetti
This patch allows the lok core to know about the device form facor of the client requesting the creation of new view, immediately instead of a later time. When a new view is needed a "DeviceFormFactor" parameter is forwarded to lo_documentLoadWithOptions and doc_createViewWithOptions from the client. This parameter can have one of the following values: 'desktop', 'tablet','mobile' and it is used to set a global variable accessible by SfxLokHelper::setDeviceFormFactor and SfxLokHelper::getDeviceFormFactor. This global variable is retrived in the SfxViewShell constructor for setting SfxViewShell::maLOKDeviceFormFactor attribute. In SfxViewShell we have the following 3 methods: - bool isLOKDesktop() - bool isLOKTablet() - bool isLOKMobilePhone() which replace the following boolean functions: - comphelper::LibreOfficeKit::isTablet - comphelper::LibreOfficeKit::::isMobilePhone Change-Id: I9b36f354278df8c216fcb90f6a9da8256ec9c1e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93340 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-05-08compact namespace in editeng..extensionsNoel Grandin
Change-Id: Ie93ac69592c3625b8e2e5db3619ce24597a07a7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93722 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-08tdf#102625: fix Formula editor breaks surrogate pairsJulien Nabet
Change-Id: I616cda97367a8fdfb6ae10eb687ca7490a943692 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93684 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-07tdf#118418 implement scrollSubstringTo() for gtkColomban Wendling
Define & use new accessibility scroll type compatible with IAccessible2 and extend the XAccessibleText interface to require scrollSubstringTo(). Co-authored-by: Martin Pieuchot <mpi@grenadille.net> Change-Id: Id3b2e8616892d7dcbfb41a14b72a8a457fd1dbf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89851 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-05use SfxStyleSheetIterator::Count directlyCaolán McNamara
Change-Id: I0715066cfbbf3457b3e000506d312b9cc0aea2d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93445 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-27tdf#116883: sw: support for lists level format stringVasily Melenchuk
Multilevel lists are more flexible in case of DOCX. There is supported custom format for any level in DOCX unlike in LO and ODT where we are limited only with prefix and suffix for hardcoded list levels separated by dot. At the same time DOCX can have lists not only "1.2.3.4", but "1/2/3/4" or even "1!2>3)4" and such format can vary on each list level. Here is basic implementation for list format as a core feature for all documents and old way (prefix-suffix + ".") is left as fallback. Practically its usage is currently implemented only in DOCX import/export. Some RTF/OOXML unittests were redesigned: since we are not creating prefix/suffix for these formats conditions should be checked in a different way. Change-Id: I1ec58bcc5874d4fa19aee6a1f42bf1671d853b14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92106 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-04-26update pchesCaolán McNamara
Change-Id: I83a61da7dda6c72552eecd377f1c3744c92a797e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92909 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-25make FastParser always take a FastTokenHandlerBase subclassNoel Grandin
since most of the call sites already do, and we can skip the slow path this way. Change-Id: I64ed30c51324e0510818f42ef838f97c401bb6dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90326 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-24Typo: LANGUAGE_ENGLISH_CARRIBEAN->LANGUAGE_ENGLISH_CARIBBEANJulien Nabet
Change-Id: Ibae29e8f0c083991ee66cc32113025d0cc8a6891 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92877 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-04-24Resolves: tdf#132288 don't merge adjacent properties for spell checkingCaolán McNamara
spell checking relies on each attribute chunk being unmerged with identical adjacent chunks Change-Id: Ia835fa054cad0dee4304f16724b9eb0c29b46102 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92866 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-23lokit: fix edit-text/view-cursor positionDennis Francis
in case of views with heterogeneous zooms. 1. EditText render position fix The EditView has an 'output-area' which is used to clip the rectangle we pass to the Paint() call. It also holds on to the ScGridWindow instance where the edit started. The 'output-area' of the EditView is in the coordinates/units of the MapMode of the ScGridWindow it holds. So we need to temporarily change the MapMode and 'output-area' of the EditView in agreement to the device(with the current view's zoom settings) where we are going to paint to. After we call the Paint(), we rollback the original settings of the EditView. 2. EditViewCursor position fix Before this change the cursor position in twips (calculated based on pixel aligned cell position in the view where editing occurred) is broadcasted to all the client-views. If the clients have different zooms, then simply scaling this common cursor position in the client for its zoom is not going to be accurate enough (due to the non-linear Logic->Pixel->Logic transformation involving pixel rounding). This is very visible if you are editing far away from A1 (like Z50). The fix is to turn off this broadcast for calc-cell editing and send view specific edit-cursor invalidation messages. This is accompanied by a online.git patch that removes unnessecary broadcast of view-cursor invalidation messages which messes up things again. "Do not broadcast view-cursor invalidation messages" (cherry picked from commit d58f1e334245f9e136750fbba267c2a941a213cc) Conflicts: editeng/source/editeng/impedit.cxx editeng/source/editeng/impedit.hxx Change-Id: Ib2fbbe4b6f93f26fc85d6adaa8684dd4397d886f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92631 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92721 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2020-04-22tdf#42949 Simplify use of rtl::math::approxEqual in include/basegfx/Gabor Kelemen
Turns out we can save about 500Mb of preprocessor input if we use rtl_math_approxEqual from rtl/math.h instead of its C++ wrapper rtl::math::approxEqual from rtl/math.hxx and manage the fallout accordingly. Before: bin/includebloat.awk | head sum total bytes included (excluding system headers): 19017296671 After: $ bin/includebloat.awk | head sum total bytes included (excluding system headers): 18535432672 Change-Id: I1691171f3a309405a7099882ad9989d147f59118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92508 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-04-22uiobject.hxx only needs forward declaresCaolán McNamara
and update pches accordingly Change-Id: I411712532fd85961bffe6678416fcdc1d9c7f53d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92617 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-15loplugin:buriedassign in e*Noel Grandin
Change-Id: Ibbf5b576296bb73e7066f2426bf2fa28739bb761 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92238 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-14loplugin:flatten in editengNoel Grandin
Change-Id: I5c83183d1f9d2d8f5a25b976ead1a7598a75c641 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92197 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>