summaryrefslogtreecommitdiff
path: root/editeng
AgeCommit message (Collapse)Author
2021-02-24avoid LOK text selection update when reference cell is in different tabPranam Lashkari
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:unusedmethodsNoel
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:constantparamNoel
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 editengNoel
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 McNamara
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..frameworkNoel
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 McNamara
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 McNamara
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 McNamara
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 McNamara
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 Nabet
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 McNamara
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 Grandin
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 Gelmini
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::queryNoel
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 Vajna
- 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 McNamara
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 Bergmann
...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 Kaganski
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 conversionsNoel
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.hxxNoel
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 Lashkari
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>
2021-02-02sw page gutter margin: add UNO APIMiklos Vajna
SvxLRSpaceItem is used for all sorts of left/right margins, but gutter only makes sense for pages, so only expose the gutter margin in the page properties. Change-Id: Icfca2499e944081b70bbdbc4c62e78cade25f5c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110322 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-02sw page gutter margin: add doc modelMiklos Vajna
The page gutter defines the amount of extra space added to the specified margin, above any existing margin values. This can be helpful in case of printed books: e.g. 1cm left margin, 1cm right margin, then some additional gutter margin on the left can mean that once the book is printed and binding consumes its space, the remaining left/right margin is matching. This is just the doc model, other parts will come in follow-up commits. Change-Id: Ibd3e836ced664b57e817f5c0952098460b683089 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110290 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-02Fix typo in codeAndrea Gelmini
As per request in comments here: https://gerrit.libreoffice.org/c/core/+/108661 I don't remember if it was already corrected and rejected. Anyway, this is massive and it compiles on my laptop. Let's see adding devs. Thanks a lot to Seth! Change-Id: I27d1fe1dccecd6644304fc6c3c2feb8413598285 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108816 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2021-01-28simplify code, use more subView()Noel
Change-Id: I569c7f34acbdf8451cd5c9acf1abd334637072d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110051 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-28TopLeft().Y() -> Top() etc.Caolán McNamara
TopLeft().X() -> Left() BottomLeft().X() -> Left() TopRight().X() -> Right() BottomRight().X() -> Right() TopLeft().Y() -> Top() TopRight().Y() -> Top() BottomLeft().Y() -> Bottom() BottomRight().Y() -> Bottom() Change-Id: I5050f619bf92cfc59b6f8dfe7c9f98ef1453c294 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110022 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-27Improve loplugin:stringliteralvarStephan Bergmann
...to also consider O[U]String ctors taking pointer and length Change-Id: Iea5041634bfbf5054a1317701e30b56f72e940fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110025 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-26loplugin:passstuffbyrefNoel
Change-Id: I330e0ab6c9955939dad313f9d472f93e39dbd313 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109924 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-24Use ContainerType().swap and avoid local variablesMike Kaganski
Change-Id: I773555180758a97aff37f9bc27de83c355d71521 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109761 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-01-21tdf#114441: Convert use of sal_uLong to better integer typessiddheshpatil777
Change-Id: I14742675541a315e72191df4ee38c35373b39d52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108842 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-01-21lok: fix incorrect invalidate cursor positionHenry Castro
When the comment is created and it's shown in the "Writer" application, it creates an initial output area: mpOutlinerView->SetOutputArea( PixelToLogic( tools::Rectangle(0,0,1,1) ) ); Unfortunately, it causes that send to client side cursor position and scroll to the beginning of the document. Change-Id: I13e21c71328b7f05781e7cdeed082d6cc2b9d679 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109371 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 4618849a1cbba4e249ee13c3b6412337160a2816) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109732 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2021-01-18Get the rest directly from startsWithMike Kaganski
Change-Id: Ie93fa23778dc224631c25dd1e9794a1af8ff4b99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109514 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-01-16make the Color constructors explicitly specify transparencyNoel
to reduce the churn, we leave the existing constructor in place, and add a clang plugin to detect when the value passed to the existing constructor may contain transparency/alpha data. i.e. we leave expressions like Color(0xffffff) alone, but warn about any non-constant expression, and any expression like Color(0xff000000) Change-Id: Id2ce58e08882d9b7bd0b9f88eca97359dcdbcc8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109362 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-15tdf#137459 editeng: Ctrl+Del must only delete rightJustin Luth
If there was nothing else at the end of the paragraph, Ctrl+Del was acting like Ctrl+Backspace - it turned around and started deleting the earlier words. Instead, we need to keep deleting to the right, starting with the next paragraph. That's what Ctrl-Backspace does in reverse anyway. It looks like this was just a copy-paste mistake already seen at original import and the few times that people tried to fix up this area, they didn't notice that apparently? But then again, the code changes don't look that impressive either... [if x == 1, set x=1?] make UITest_writer_tests UITEST_TEST_NAME=\ tdf137459_editeng_ctrl-DEL.tdf137459.test_tdf137459 Change-Id: I0c2268f9f1a2102997b2e84b0b7a6d0e2da43b15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108265 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-01-13tdf#139493 EditViewCallbacks might not implement EditViewPopupParentCaolán McNamara
in which case fallback to the vcl::Window Change-Id: Idc72f04ce72b1bcd42d80869e0ee86b653343a17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109234 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-13transparency->alpha in GraphicAttrNoel
Change-Id: I1fe9311871724ff8b7b8960f5dba6e890198565c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109211 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-12transparency->alpha in tools::ColorNoel
this just changes the Get/Set methods, the constructor and internal representation of Color is not changed. Change-Id: Idb6e07cc08bbaa5bd55b6bd4b585e648aef507b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109074 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-10tdf#96787: AutoCorrect: after deleting a replacement entry, it's still usedJulien Nabet
If specific acor<language>.dat exists in "user", don't use the initial one in "share" since the initial one will still contain the deleted entry. See detailed explanation here: https://bugs.documentfoundation.org/show_bug.cgi?id=96787#c21 Change-Id: Ic349159c93d9fc327f38a1d4e8187e3bdc16d08a Change-Id: If6b16641d04721f2945a8e920e2933d1b8baa90f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109039 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-01-09fix coverity parse errorsCaolán McNamara
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-08Introduce Color::IsFullyTransparentNoel
Change-Id: I94875b9fb7ee18edf63ed28902da4ae77eb14bb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108973 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-08use more IsTransparentNoel Grandin
Change-Id: I3ef18a2601a51d56614b5da9b56e871bd33ec79e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-07Use o3tl::temporary in calls to OUString::iterateCodePointsStephan Bergmann
...that are not interested in the updated *indexUtf16 value Change-Id: Iaaa0fe45dcb54c4a8a347bcdb6fca6041218d009 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108941 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-07tdf#42982 Improved UNO API error reportinghomeboy445
Change-Id: I450ea0b1a19381c47370633d124c2ba906415987 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108356 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2021-01-06Drop comphelper::string::equals; compare OUString to OUStringCharMike Kaganski
In cui/source/tabpages/autocdlg.cxx, use code point-based methods for comparison with sal_UCS4 values in SvxSwAutoFormatFlags. Change-Id: If34c981393774d1b8db649f0c29870e1ca6bdfe8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108847 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-01-06move the bigint based Scale() implementations to one central placeNoel Grandin
Picking the best looking one in the process. Change-Id: I77f9236fcd21f883a23fe2f43f20336f17b44cc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108831 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-05sw doc model xml dump: improve keep-with-next outputMiklos Vajna
From: <SfxBoolItem whichId="110" value="TRUE"/> To: <SvxFormatKeepItem><SfxBoolItem whichId="110" value="TRUE"/> Change-Id: I08f45e3481a5beebb4c1b8fcf0919741ad185e79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108687 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-01-04loplugin:stringviewparam: operator +=Stephan Bergmann
Change-Id: I30ce1b5bd8fb168da7067c1967c5af2569df2653 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108512 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-04tdf#120171 editeng: don't reduce nBreakPosMark Hung
even if it is greater then nMaxBreakPos. The only situation that happens is when there is a hanging punctuation. Reducing nBreakPos to nMaxBreakPos always break that punctuation to the next line. Change-Id: Ie4b61d21f4d8f6f874e2a969260c13a3bca2a049 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108594 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2020-12-30vcl: remove {Read,Write}ImpGraphic and ImplExportNative from GraphicTomaž Vajngerl
ReadImpGraphic and WriteImpGraphic have been reimplemented in the TypeSerializer some time ago, but the code has not yet been moved to use that class. This commits does that and changes all the code using those 2 methods and removes them. With this implemented in the TypeSerializer, it is easier to handle In addition it also removes ImplExportNative (and the method on the Graphic interface). This was really used only in one method, and it could be implemented in the mthod itself. Change-Id: I0982429d1c1d5ed7ef07627d87ed9a08df43f040 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108256 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>