summaryrefslogtreecommitdiff
path: root/editeng
AgeCommit message (Collapse)Author
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>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-26vcl: use Color:IsTransparent() where appropriateChris Sherlock
Change-Id: I37bbab5f22f91faad65be8ef79734ce1ee6355d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108249 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-26New loplugin:stringliteralvarStephan Bergmann
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for details. (Turned some affected variables in included files into inline variables, to avoid GCC warnings about unused variables.) Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-24custom literal for Degree10Noel Grandin
Change-Id: Id13869138a622e62d9ffebf2c89bddccda6aff01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108238 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-24Use range-based forMike Kaganski
Change-Id: I0c580cd1a9da75b799357dbf011894ebd7588698 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108181 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-12-23Directly pass in OUString instancesStephan Bergmann
All the passed-in pStrmName are either pXMLImplCplStt_ExcptLstStr or pXMLImplWrdStt_ExcptLstStr, both of which are ASCII-only, so using RTL_TEXTENCODING_MS_1252 wasn't relevant. Change-Id: Idc6fa06b31641f4004da090378adaed73e07e5bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108234 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-19use more string_view in SfxItemPropertyMapNoel
Change-Id: I053dedcbf0b110a61752722d247d6ee5e9ba481d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107977 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-18add a return to EditView::Command to indicate if the command was consumedCaolán McNamara
Change-Id: I971fcfb77d93d7d1146443a8ec30d9159746bd89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107960 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-18use the OutputDevice viewCaolán McNamara
Change-Id: I017c7a8a39068263a9b3dc74714300abd3cb6159 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107959 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-18add GetOutputDevice to EditViewCaolán McNamara
Change-Id: I8b2555669106096b9ab37e0cc89267f5759efa3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107958 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-17weld editview menuCaolán McNamara
Change-Id: I26bd2d011b5665f198f18d35b8433becca904991 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107572 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-17drop dumping intermediate popup menu and go straight to boost::property_treeCaolán McNamara
Change-Id: I1209cf14cd23adee9ecf01b73bfcc95b80dea07a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107887 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-16hint as to the special handling of the edit popup menu in LOKCaolán McNamara
Change-Id: I0d00210ea4d9a1d388f473584edc74b2de814cc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107783 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-15use GetParentWithLOKNotifier to get the frame LOKNotifier to reuse for menusCaolán McNamara
so it doesn't have to be explicitly set by the editview menu creator If I force enable LibreOfficeKit::isActive and right click on a mispelled word in impress, or in the writer comments-in-margin before or after this change I see the same ILibreOfficeKitNotifier set on the MenuFloatingWindow. Seeing as this is used in only the editview spell checking menu give that a unique id 'editviewspellmenu' and only do this for that id SetLOKNotifier in vcl/source/window/menu.cxx added with: commit 8938e8b153f32f3f5926baddb87cb76c8e72755a Author: Jan Holesovsky <kendy@collabora.com> Date: Thu Mar 8 21:07:40 2018 +0100 lokdialog: Tunnel the spell-checking context menu with recommendations. Change-Id: I1a7952e88a3f89346c97d2516628b4a7a0423de6 Reviewed-on: https://gerrit.libreoffice.org/51062 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/51166 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com> SetLOKNotifier in editeng/source/editeng/editview.cxx added with: commit 7c6fbd0ac3b5927b337aa69b132aba14e9b3103f Author: Tamás Zolnai <tamas.zolnai@collabora.com> Date: Mon Apr 16 14:38:36 2018 +0200 sd lok: Impress: Right-click menu on misspelled word locks up session Change-Id: Ib554eea7049c1ea244bc4789ee3d7d2adf87e283 Reviewed-on: https://gerrit.libreoffice.org/52977 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Change-Id: I6c23ba4252eab3850b7cc4c8cad2d2f8adee2792 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107747 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-15update pchesCaolán McNamara
Change-Id: I280dea8fe5f346a5555f4bf479896877579d63e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107748 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-15get parent for welded menu and location to pop it upCaolán McNamara
Change-Id: I654f6edc4b8bdb0e38f70757b970893980b09638 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107728 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-14add missing 'use_underline'Caolán McNamara
Change-Id: Ie6d549b20461d7bb80fd78deb393320e5ba57c0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107725 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-11Adapt the remaining OUString functions to std string_viewStephan Bergmann
...for LIBO_INTERNAL_ONLY. These had been missed by 1b43cceaea2084a0489db68cd0113508f34b6643 "Make many OUString functions take std::u16string_view parameters" because they did not match the multi-overload pattern that was addressed there, but they nevertheless benefit from being changed just as well (witness e.g. the various resulting changes from copy() to subView()). This showed a conversion from OStringChar to std::string_view to be missing (while the corresponding conversion form OUStringChar to std::u16string_view was already present). The improvement to loplugin:stringadd became necessary to fix > [CPT] compilerplugins/clang/test/stringadd.cxx > error: 'error' diagnostics expected but not seen: > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd] > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd] > 2 errors generated. Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-11spelling context menu misplaced in margin commentsCaolán McNamara
in writer, comments in margin, right clicking on a misspelt word and the menu is misplaced, very misplaced if the comment is long enough that the comment has a scrollbar and the word is near the end Change-Id: I8e806346bdca08e33c3926dae008d71de4fe03d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107590 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-10don't need a vcl::Window for PixelToLogicCaolán McNamara
Change-Id: Iccf5fe5e736017962a58d6471bb2d1890f77c6c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107560 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-04update pchesCaolán McNamara
Change-Id: I3e22c2000da03f6f3345353846213203993aa865 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107192 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-02fastparser in SvxXMLTextImportContextNoel
Change-Id: I702a77ea17ee80270d257e10f56a91b026800e1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107048 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-01OSL_FAIL.*exception -> TOOLS_WARN_EXCEPTIONNoel
Change-Id: I6800e23ead2767d245d5da71d2d40e0f8a6d7e1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106859 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-25Use sal_Int64 to printf tools::Long valuesStephan Bergmann
(The "%l" format specifiers had now caused -Werror,-Wformat with clang-cl for a Windows 64-bit build.) Change-Id: I86b9617310f7348d72172cc7a29f0976c7030dd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106576 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-17loplugin:stringviewparam check methods tooNoel
not just functions Change-Id: Icca295dd159002b428b73f2c95d40725434f04d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105789 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>