summaryrefslogtreecommitdiff
path: root/editeng
AgeCommit message (Collapse)AuthorFilesLines
2021-04-15store ptr to the original entries in SfxItemPropertyMapNoel Grandin3-26/+26
instead of copying them to a new data structure that is practically identical. Helps startup time since we build a ton of these when loading documents. And use o3tl::sorted_vector as a dense map data structure to reduce allocations and improve cache friendliness, since this is a build-once thing. Change-Id: I950be03b1a21c0c81c40f2677d4215f5e8e256cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114015 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-12less copying in SfxItemPropertyMap::getPropertyEntriesNoel Grandin1-1/+1
we can just expose the map now, and avoid copying all the properties Change-Id: Icb22975508582268dfa96e41eb98ac01e7f51317 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113982 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-08update PCHsLuboš Luňák1-1/+3
Change-Id: Ia9d04447f927e270a55500e7f35723a729bc01dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113801 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-04-07Updated README.md files to represent current code / use Markdown formatHossein1-8/+10
Previously, all of the README files have been renamed to README.md and now, the contents of these files were changed to use Markdown format. Other than format inconsistency, some README.md files lacked information about modules, or were out of date. By using LibreOffice / OpenOffice wiki and other documentation websites, these files were updated. Now every README.md file has a title, and some description. The top-level README.md file is changed to add links to the modules. The result of processing the Markdown format README.md files can be seen at: https://docs.libreoffice.org/ Change-Id: Ic3b0c3c064a2498d6a435253b041df010cd7797a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113424 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-04-07lok: remove popup auto correct itemHenry Castro1-1/+3
The auto correct options and auto correct menu item are no longer need it. Change-Id: I0a5e624c3393151cf80a06961f96d6a5fb8891ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113680 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2021-04-07rtl::Static -> function local staticNoel Grandin2-18/+6
Change-Id: I2071c27bdf074403ec24e67f9278ac27f9491303 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113698 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-06remove Application::GetDefDialogParent call in editengCaolán McNamara7-31/+25
and pass in an explicit parent to use Change-Id: I1aa768ec5ac13b2097b78499f964a3590a0ac14e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113695 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-06ExecuteSpellPopup never called with a null spelling callbackCaolán McNamara2-35/+13
Change-Id: Id03001541ccfd8503a7b8181598bad9811542b4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113694 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-06typo: Allign->AlignCaolán McNamara1-5/+5
Change-Id: I621dbef277d72f293c4cb10e020683a14d08ac51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113673 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-06use GetOutputDevice for ImpEditView::GetBackgroundColorCaolán McNamara6-43/+47
in case the host is using getEditViewCallbacks Change-Id: Iadc146a585c3fc3df6f77ab8def2d697da5186a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113671 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-28cid#1473839 Untrusted loop boundCaolán McNamara1-0/+6
Change-Id: Iedb13791e19f635117040698e1fc45a5c1c3968d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113235 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-26tdf#119292 sc layout: fix overlapping wrapped cell textsTibor Nagy1-22/+52
if rotated by 90 or 270 degrees using clipping to cell boundaries, like MSO does. E.g. this avoid of importing MSO documents with unreadable header cells. Note: it's possible to improve the patch extending clipping for the neighboring empty area instead of clipping all text exceeding the cell boundary (as in the case of the non-rotated, non-wrapped text). Co-authored-by: Attila Szűcs (NISZ) Change-Id: Idd37f7eb7208ff3818dcdab93ef0ec57275db954 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111964 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-03-25const OUString -> const OUStringLiteralMike Kaganski3-3/+3
Mostly automated rewrite Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-24Using .md extension/Markdown syntax for modules READMEHossein1-0/+0
Renaming all README files for all top level modules to README.md, applying no content change at this stage to be able to track history of the files. These files should be edited to use correct Markdown syntax later. Change-Id: I542fa3f3d32072156f16eaad2211a397cc212665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112977 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-03-22cid#1474210 silence Untrusted divisorCaolán McNamara1-1/+1
m_nWidth is set to nOut + nIn + nDist so use that to better show that there won't be a divide by zero m_nWidth Change-Id: I67b56f5a55966c89e6edfab821f12852ceaa6f6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112885 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-21cid#1473926 Uninitialized scalar variableCaolán McNamara3-14/+4
Change-Id: I794d2b58aa65f7eeb3aa32fa50e827ebf32b35ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112843 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-21cid#1473798 silence Unchecked return value from libraryCaolán McNamara3-3/+3
Change-Id: I00174b5444749f3345f5691e24eb5219d1b47059 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112837 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-21update pchesCaolán McNamara1-1/+2
Change-Id: I60e61133c305673bb305e41957f5414820c7c358 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112790 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-20invalidate via Editview::InvalidateWindowCaolán McNamara1-1/+1
which is the same as the old for the case of hosted in a vcl::Window but calls EditViewCallbacks::EditViewInvalidate if installed Change-Id: I3fff631102c68384f2a4913a57ce6de2039af9fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112784 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-20add GetInputLanguage to EditViewCaolán McNamara1-0/+8
and hide the need to expose its vcl::Window Change-Id: Ide8a2e2500116af412a8717052a300e8ef4d1a48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112782 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-19silence coverity unchecked return value from library on xmlText* functionsCaolán McNamara10-159/+159
Change-Id: I651abb00d8ae1bdbf758a6a0176fd8912531a585 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112753 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-14loplugin:unusedmethodsNoel1-5/+0
Change-Id: I851eba4ca80eac9ee5896df53fbcd0f5ad125763 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112433 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-09fetch/set/clear primary selection without intermediate vcl::WindowCaolán McNamara2-10/+2
the intermediate layer doesn't do anything useful Change-Id: I00564f43db8914445ea4013c6f387c7d7c783427 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112170 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-09Make sal/config.h the first in pchMike Kaganski1-2/+2
By convention, it should be the first include in C/CXX files; so use of pch should not break that. Change-Id: Ic329c5f39e8f48ad1778724368e262e48972342b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112123 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-08tdf#140498 middle-button paste doesn't depend on a vcl::WindowCaolán McNamara2-16/+12
Change-Id: I4f1f14994b35cec51761689875bf6b5135612f3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112161 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-08just call GetWindow onceCaolán McNamara1-4/+4
Change-Id: If8f0c35901024687c9a8c57e6bcf6756f37007f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112172 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-01tdf#140342 sw layout: remove explicit gutter handling when positioning bordersMiklos Vajna1-1/+1
Word has two modes the specify border positions: the distance can be measured from the edge of the page or from text. Similar to how documents that have page borders but no gutter, page page border + gutter documents should be always measured "from text" by the layout. "From page" should be a concern for Word filters. "From page" was already working -- fix "from text" by changing the layout to do "from text" and then extending DOCX import/export to handle gutter while handling the "from page" page borders. This also requires allowing nominally negative top margins, because we want to have the gutter unchanged, but the border might want to be on the gutter area, which is only possible with a negative top margin. Change-Id: I7f2c9943357359e76cb554cb2a65b93a492e694b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111735 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-02-26tdf#134940 sw: fix AutoCorrect of arrow "-->"László Németh1-1/+4
Fix bad replacement of "-->" with "–>" instead of "→" (i.e. premature replacement of "--" to n-dash) since '>' was added to IsAutoCorrectChar(). Regression from commit 57f07b1d7378d218648667c5b1315cc8ad905875 "tdf#133524 AutoCorrect: support double angle quotes". Change-Id: I06f0cddb48d13c8e230dab964f79f588799ed4ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111527 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-02-24avoid LOK text selection update when reference cell is in different tabPranam Lashkari1-3/+6
Change-Id: I511b9c5a27f97b6e14e9a844179c27a96997abe1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111315 Tested-by: Jenkins Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
2021-02-23loplugin:unusedmethodsNoel1-5/+0
Change-Id: Ie0534244cc7a30ad006e65baf125c59757c90d50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111388 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-23loplugin:constantparamNoel1-2/+2
Change-Id: Ieaee9a3e3ef4aa9bc390ddb198ee1718f635bcbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111391 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-22loplugin:refcounting in editengNoel11-28/+24
Change-Id: I7d00bede5dbf216e5d3d179a03b101322ae23e11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111287 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-19update pchesCaolán McNamara1-1/+2
Change-Id: Ic4586057346b6de700c1bb6ff4cd759a11bb3e4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111231 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-16loplugin:referencecasting in editeng..frameworkNoel2-3/+3
Change-Id: Ia3375011ecd0a65afed0f131f477fc1542603fde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-15use GetPopupParent for editeng transient dialogsCaolán McNamara4-9/+12
Change-Id: Ie799643b68ea41b4c4d0d0493755d09d3983d9e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110934 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-15use GetOutputDevice for PixelToLogicCaolán McNamara3-8/+8
Change-Id: I0e5dfb49554029261f98cc4abca0295aef10b892 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110933 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-15tdf#140414 add getting mouse pos to EditViewCallbacksCaolán McNamara1-5/+7
Change-Id: I09172e0cb24f5c45d2837cf2f2fc7cc4baa456a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110932 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-15Revert "ofz#29461 flatten SetAttrSet recursion"Caolán McNamara1-35/+13
Compress deletes nodes so the flat list becomes invalid This reverts commit d1b3571fba171279d70ccaa0dfec1871f04439af. Change-Id: I70e52ac3988493a283ca83121bd2e4a67db6f5ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110901 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-15tdf#140414: fix Crash pressing Ctrl-K in input line in CalcJulien Nabet1-1/+4
3 0x00007ff38b819d73 in vcl::Window::GetPointerPosPixel() (this=0x0) at vcl/source/window/mouse.cxx:552 4 0x00007ff3925fe7c1 in EditView::GetFieldUnderMousePointer(int&, int&) const (this=0x4c37160, nPara=@0x7ffd982b4f44: 0, nPos=@0x7ffd982b4f40: 57752960) at editeng/source/editeng/editview.cxx:1325 5 0x00007ff3925fe74a in EditView::GetFieldUnderMousePointer() const (this=0x4c37160) at editeng/source/editeng/editview.cxx:1315 6 0x00007ff3925fec4c in EditView::GetFieldAtCursor() const (this=0x4c37160) at editeng/source/editeng/editview.cxx:1384 7 0x00007ff377f6aa55 in ScEditShell::GetURLField() (this=0x37a31a0) at sc/source/ui/view/editsh.cxx:833 Change-Id: Ib369644f26eec4f37a34213f0b0113359a653098 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110884 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-13ofz#29461 flatten SetAttrSet recursionCaolán McNamara1-13/+35
Change-Id: I39a2364371981a177af8ca8dd679038c9543523c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110828 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-11fix spelling AppendBlanc->AppendBlankNoel Grandin2-3/+3
Change-Id: I6b5a6fcb1893a02751ff06bb3584c35065777513 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110707 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-10Remove unneeded breaksAndrea Gelmini1-1/+0
Extending this: https://gerrit.libreoffice.org/c/core/+/110512 Change-Id: If7e6f9c4079c2e0b48e642aa0b140fb4e03996bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110520 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-09loplugin:referencecasting check for Reference::queryNoel1-1/+1
Change-Id: I008d16d933c70df132699872ac4c39a5c1f87b34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110592 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-08tdf#91920 sw page gutter margin: handle mirrored marginsMiklos Vajna1-0/+5
- SwPageDesc::Mirror: generate "right gutter margin" from gutter margin for mirrored pages, we just lost the gutter margin here previously - SwBorderAttrs::CalcRight: handle right gutter margin, so gutter increases the right margin, not the left margin on mirrored pages - lcl_CalcBorderRect: similar to left and top margins, compensate for right margin gutter as well, so borders are independent from the gutter margin (Word compat) Change-Id: Ie4d3459ab6edcc60b20c2fed08dbf45060ca9828 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110585 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-08update pchesCaolán McNamara1-4/+2
Change-Id: Icf55ddda055d11b649e7607c2cdd8b6d6ddfefbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110483 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-08Improve loplugin:cppunitassertequal for CPPUNIT_ASSERT(a && b)Stephan Bergmann1-10/+20
...by re-enabling the code temporarily #if'ed-out in a528392e71bc70136021be4e3d83732fccbb885e "Fixed/improved loplugin:cppunitassertequals" (and which then triggers lots of other lopglugin:cppunitassertequal CPPUNIT_ASSERT -> CPPUNIT_ASSERT_EQUAL warnings). For two css::uno::Reference equality comparisons in cppu/qa/test_any.cxx, it was more straightforward to rewrite them with an explicit call to operator == (which silences loplugin:cppunitassertequal) than to adapt them to CPPUNIT_ASSERT_EQUAL's requirement for arguments of identical types. In sc/qa/unit/ucalc_pivottable.cxx, ScDPItemData needs toString, which has been implemented trivially for now, but might want to combine that with the DEBUG_PIVOT_TABLE-only ScDPItemData::Dump. Change-Id: Iae6d09cf69bd4e52fe4411bba9e50c48e696291c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110546 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-05Make sanitiseMm100ToTwip simpler and more correctMike Kaganski1-6/+6
The result's absolute value is always smaller than n. Returning an uncorrected value taken from reversing multiplication and division order when intermediate value would overflow is better than arbitrary constant. Also further deduplicate Twips <-> 100th-mm conversion, and make sure they all are in a single header. Using conversion implementation that handles negatives correctly improves accuracy, as seen in unit tests; e.g. in testPictureEffectPreservation (the original doc had "dir" equal to "8100000", while we tested that it was "8076614" after roundtrip). Change-Id: Icd027af6238a9f45f916f53f8684506cc959e696 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110433 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-04have one set of twips<->mm conversionsNoel1-9/+5
Change-Id: I510f4a0524a7c72eb124cba103cbf398024976d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110407 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-04remove svx/mutxhelp.hxxNoel1-2/+2
which is a clone of cppu::BaseMutex Change-Id: I6db266a4b67ac2d8b6c389cd27bf5bc7b9ecc754 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110402 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-03enable hyperlink to be detected at the end of textPranam Lashkari1-1/+1
now in online hyperlink popup will appear even when the cursor is at the end of hyperlink text Change-Id: I80a1a093afa11e39236693f8a2639741f74c9876 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110227 Tested-by: Jenkins Reviewed-by: Pranam Lashkari <lpranam@collabora.com>