summaryrefslogtreecommitdiff
path: root/editeng/source
AgeCommit message (Collapse)Author
2021-06-23tdf#142716 Update selection after any text is inserted.Gülşah Köse
When we don't update the selection after insertion of new text SvxUnoTextBase::createEnumeration knows old selection and losts last part of the text. Change-Id: I20f6530f34097ff213ff00cff617139887fd287a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117409 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> (cherry picked from commit e837f50313a703b6b26abb78f224472c1e4734ea) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117557 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-05-26Seperate SvxBackgroundColorItem from SvxColorItemGülşah Köse
SvxBackgroundColorItem derivated from SfxPoolItem instead of SvxColorItem. Casting is common usage to control if object is this or not. When we can cast SvxBackgroundColorItem to SvxColorItem we can not seperate them anymore. eg: Char color is a SvxColorItem and char background color is a SvxBackgroundColorItem. They can be hold together and we should understand they are different types. Change-Id: I7b1879a1b00de26c0b8a2d9f8d658aa3aef75ecb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116135 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116183
2021-04-19a11y tests show we should use GetOutputDevice for pixel/logic conversionsCaolán McNamara
Change-Id: I229ffb376b03ff2479385632319661dd35a63fea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114188 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2021-03-10tdf#140498 middle-button paste doesn't depend on a vcl::WindowCaolán McNamara
Change-Id: I4f1f14994b35cec51761689875bf6b5135612f3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112085 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-02-26tdf#134940 sw: fix AutoCorrect of arrow "-->"László Németh
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> (cherry picked from commit d1be3d80d0ca5ccd7639ede379a1befc48dc73f2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111579 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
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/+/110859 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
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> (cherry picked from commit ae56dc05b27f05ffcee99845d661a237e70a7a51) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108998 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.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> (cherry picked from commit 2ffa6c897379bf07367d445918b4c142cd493e7f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108591 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
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> (cherry picked from commit 9e0de138a5afaa7132ee535a15741effc983d2b0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106612
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>
2020-11-16Instead of labs, use overloaded absStephan Bergmann
...more likely to pick an appropriate version for the involved integer types, esp. after the recent long -> tools::Long changes Change-Id: Ia91259ca35aaf74b0e907de6831fc926f30057f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-13tdf#123936 Formatting files in module editeng with clang-formatPhilipp Hofer
Change-Id: I745057f4a6dc0d8103ed7fa29d0f662226a5cee5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105663 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-12New loplugin:stringviewparamStephan Bergmann
...to "Find functions that take rtl::O[U]String parameters that can be generalized to take std::[u16]string_view instead." (Which in turn can avoid costly O[U]String constructions, see e.g. loplugin:stringview and subView.) Some of those functions' call sites, passing plain char string literals, needed to be adapted when converting them. Change-Id: I644ab546d7a0ce9e470ab9b3196e3e60d1e812bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105622 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-12tdf#42949 Fix new IWYU warnings in directories [e-f]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I963aa5fb892a0be36212fd0587b69f217f017947 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105469 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-11-11loplugin:stringviewNoel
Add new methods "subView" to O(U)String to return substring views of the underlying data. Add a clang plugin to warn when replacing existing calls to copy() would be better to use subView(). Change-Id: I03a5732431ce60808946f2ce2c923b22845689ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105420 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11convert more long -> tools::LongNoel
found by grepping and changed by hand. Change-Id: I3c720859dba430fde3abc76c6c5cb58269efaf4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105512 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11make tools::Long 64-bit on Windows platformNoel Grandin
This is only for the 64-bit windows platform. I don't see the point in messing with the 32-bit platforms, they are (a) become more and more rare (b) unlikely to even have enough available process memory to load extremely large calc spreadsheets The primary problem we are addressing here is bringing Windows-64bit up to same capability as Linux-64bit when it comes to handling very large spreadsheets, which is caused by things like tools::Rectangle using "long", which means that all the work done to make Libreoffice on 64-bit Linux capable of loading large spreadsheets is useless on Windows, where long is 32-bit. The operator<< for tools::Rectangle needs to be inside the tools namespace because of an interaction with the cppunit printing template stuff that I don't understand. SalPoint changed to use sal_Int32, since it needs to be the same definition as the Windows POINT structure. Change-Id: Iab6f1af88847b6c8d46995e8ceda3f82b6722ff7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-06tdf#137908 Revert "use FasterParser for LoadXMLExceptList_Imp"Noel Grandin
This reverts commit 79ea745d595945e454ced9f6cacd2bb57aa51f95. Change-Id: I88d0ae9f0a3ec6691fdd09c58b20532833d8c090 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105373 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-02make SvXMLImport capable of mixing fast- and slow- contexts adhocNoel
so I can convert even *ImportContext subclasses in the middle of a context stack, and thus break the cyclic dependency nature of the writer import. and adjust the xmlimport loplugin for the new rules. As a consequence of the loplugin:xmlimport's checking, we remove a bunch of now unnecessary overrides of startFastElement. Change-Id: I97464522ede8ec5e345e928cdafa4b18364b1b80 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-28std::set->o3tl::sorted_vector in ImpEditEngineNoel Grandin
Change-Id: Ia78b986c28e2d8e3655d5c8f56d3cb5cd7a5ee1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104944 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-28convert some more long -> tools::LongNoel
grepping for stuff in template params this time Change-Id: Ia37bfd85480b3a72c3c465489581d56ad8dde851 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104855 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-27Resolves: tdf#137620 add DeleteSurroundingText at vcl::Window levelCaolán McNamara
a) give it a default implementation based on the current one b) re-use code introduced for WeldEditView::DeleteSurroundingText for the EditView containing vcl::Window in impress/draw and various similar Annotation windows Change-Id: I55547c70e90ee394795b5545450cf8131538fad8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104781 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-26std::unique_ptr -> std::optionalNoel
Change-Id: Icd4c818579a7b15454706ab4e02d47e1ac368160 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104796 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-26std::unique_ptr -> std::optionalNoel
Change-Id: Icf8168423af437fda88a6bd26679fecb699606e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104795 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-25editeng: AccessibleImageBullet : avoid recursive SolarMutextArnaud Versini
Change-Id: I7dc6c2dbeda4f35c609ef154af888480a81f2512 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104777 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-23tdf#104378: don't reset para attributes whileMark Hung
converting Chinese characters. In TextConvWrapper::ChangeText_impl, calls to EditView::RemoveAttribs() reset the paragraph attributes. That makes SvxLanguageItem of EE_CHAR_LANGUAGE_CJK become LANGUAGE_DONTKNOW. Hence it always stops converting after the first success. This patch overload EditView::RemoveAttribs() so that it is possible to clear all character attributes of the selction without touching paragraph attributes. Before, bRemoveParaAttribs either removes items between EE_ITEMS_START and EE_CHAR_END, or removes items between EE_CHAR_START and EE_CHAR_END. The patch add a new enum class EERemoveParaAttribsMode, with the following values: 1. RemoveAll : correspond to the old bRemoveParaAttribs = true 2. RemoveCharItems: correspond to the old bRemoveParaAttribs = false 3. RemoveNone: new thing for "don't touch para attributes." Change-Id: I5132e708dea9e2066f13f1b001bd954d7b477f56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104484 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2020-10-21new tools::Degree10 strong typedefNoel Grandin
partly to flush some use of "long" out the codebase, but also to make it obvious which units are being used for angle values. Change-Id: I1dc22494ca42c4677a63f685d5903f2b89886dc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104548 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-20use tools::Long in editengNoel
Change-Id: Ib7014c353489461ad9489d9f3fefd59a32f8f877 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104524 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-16weld InputBarCaolán McNamara
this also restores that DnD of a selection from the inputbar is pasted as plain text not rich text formatted with the happenstance formatting of the inputbar's EditEngine Change-Id: If4934f83c14357afec2e0a7e1d51c8a1aea1d292 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104037 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-16fix some *printf which are using "%l" ie. long specifiersNoel
which are not portable between Linux and Windows because long is not portable. In preparation for converting long -> tools::Long Change-Id: I8bf1aa1570946ca887a6c83dd5f99c024d437336 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104374 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-15don't crash if not hosted in a vcl::WindowCaolán McNamara
Change-Id: I6c1e774461db5d144d09de7d5c532407f1c572b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104373 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-13combine duplicates togetherCaolán McNamara
Change-Id: Ic4d5b50051cee4ab65a366ed7d26c222a7ca3008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104227 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-13static_cast after dynamic_castNoel
Change-Id: I487b5dc148f5a3d0d45f198c00179002841242ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104213 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-12ofz#24932 collatoral ubsan failure seen in TimeOut caseCaolán McNamara
unsigned integer overflow: 0 - 1 cannot be represented in type size_t Change-Id: Iba74ce28752e4024e0921f91f28866fd9eaf248e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104195 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-10drop newly unused OutlinerParaObject ctor variantCaolán McNamara
Change-Id: I6fcd6eb9e7ed2519e6df08fe09c38652e4e76439 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104176 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-10ofz#23492 the only user of this ctor throws away the original of the cloneCaolán McNamara
so we can take ownership of the original instead Change-Id: I26fd4303a3b205df309f91bfa5bcddbbc41dfd7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104173 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-08add EditViewCallbacks handler to support updating scrollbar stateCaolán McNamara
the problem is that since... commit 319d8be9dad248a3ced5ac311e0b20ec3ed4cef7 Date: Tue Nov 22 16:21:20 2011 +0000 tweak experimental gsoc multiline input bar, better resizing, enable scroll that uses SetNofifyHdl to try and keep its scrollbar up to date, but that SetNotifyHdl is also used by a11y to listen to the editengine and only one can be set at a time, so with a11y enabled (the gtk default case) either a11y works or the multiline scroll doesn't or vice versa. Seeing as the a11y case is the very complicated case, leave a11y alone and plot a route to disentangle the straightforward calc multiline edit from a11y. Change-Id: Iedc7ffc39940354e8a05c0620944f617eee6b550 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104080 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-06loplugin:const& make some params and methods constNoel
Change-Id: I2973128a9c6c53187e1da400d1a5df763d515596 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104020 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-02loplugin:reducevarscope in desktop..emfioNoel
Change-Id: I25ca760ae15114ada621d928997a7117401c75d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103811 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-02tdf#134566 gtk IM support for custom widgetsCaolán McNamara
Change-Id: I5c731161768d09d021db5c353de816e173159096 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103764 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-01Related: tdf#134566 tell IM cursor pos for empty paragraph tooCaolán McNamara
even if there is no text yet we should update the IM cursor position if asked for it Change-Id: I9c3b9eef9f58180b00a8276d25fad83400a92043 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103751 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-30tdf#134566 accept input engine commands in editview in custom widgetCaolán McNamara
for the generic case first Change-Id: I10bd707900b54c70c9bda79d5d09532cc159779e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103692 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-22Related: tdf#132970 handle more places with potentially utf16 bulletsCaolán McNamara
Change-Id: Iac6b319700d610b5a1debff0a633172b2411c40e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103161 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-22tdf#132970 SMP bullets mangledCaolán McNamara
working: a) bullet preview b) writer rendering c) save to odt a) load from odt Change-Id: I2f85576389fe4f0437f81799c14dfd98c8c40b2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103129 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-16Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uStringStephan Bergmann
...from which an OUString can cheaply be instantiated. This is the OUString equivalent of 4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into a consteval'ed, static-refcound rtl_String". Most remarks about that commit apply here too (this commit is just substantially bigger and a bit more complicated because there were so much more uses of OUStringLiteral than of OStringLiteral): The one downside is that OUStringLiteral now needs to be a template abstracting over the string length. But any uses for which that is a problem (e.g., as the element type of a container that would no longer be homogeneous, or in the signature of a function that shall not be turned into a template for one reason or another) can be replaced with std::u16string_view, without loss of efficiency compared to the original OUStringLiteral, and without loss of expressivity. The new OUStringLiteral ctor code would probably not be very efficient if it were ever executed at runtime, but it is intended to be only executed at compile time. Where available, C++20 "consteval" is used to statically ensure that. The intended use of the new OUStringLiteral is in all cases where an object that shall itself not be an OUString (e.g., because it shall be a global static variable for which the OUString ctor/dtor would be detrimental at library load/unload) must be converted to an OUString instance in at least one place. Other string literal abstractions could use std::u16string_view (or just plain char16_t const[N]), but interestingly OUStringLiteral might be more efficient than constexpr std::u16string_view even for such cases, as it should not need any relocations at library load time. For now, no existing uses of OUStringLiteral have been changed to some other abstraction (unless technically necessary as discussed above), and no additional places that would benefit from OUStringLiteral have been changed to use it. Global constexpr OUStringLiteral variables defined in an included file would be somewhat suboptimal, as each translation unit that uses them would create its own, unshared instance. The envisioned solution is to turn them into static data members of some class (and there may be a loplugin coming to find and fix affected places). Another approach that has been taken here in a few cases where such variables were only used in one .cxx anyway is to move their definitions from the .hxx into that one .cxx (in turn causing some files to become empty and get removed completely)---which also silenced some GCC -Werror=unused-variable if a variable from a .hxx was not used in some .cxx including it. To keep individual commits reasonably manageable, some consumers of OUStringLiteral in rtl/ustrbuf.hxx and rtl/ustring.hxx are left in a somewhat odd state for now, where they don't take advantage of OUStringLiteral's equivalence to rtl_uString, but just keep extracting its contents and copy it elsewhere. In follow-up commits, those consumers should be changed appropriately, making them treat OUStringLiteral like an rtl_uString or dropping the OUStringLiteral overload in favor of an existing (and cheap to use now) OUString overload, etc. In a similar vein, comparison operators between OUString and std::u16string_view have been added to the existing plethora of comparison operator overloads. It would be nice to eventually consolidate them, esp. with the overloads taking OUStringLiteral and/or char16_t const[N] string literals, but that appears tricky to get right without introducing new ambiguities. Also, a handful of places across the code base use comparisons between OUString and OUStringNumber, which are now ambiguous (converting the OUStringNumber to either OUString or std::u16string_view). For simplicity, those few places have manually been fixed for now by adding explicit conversion to std::u16string_view. Also some compilerplugins code needed to be adapted, and some of the compilerplugins/test cases have become irrelevant (and have been removed), as the tested code would no longer compile in the first place. sal/qa/rtl/strings/test_oustring_concat.cxx documents a workaround for GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96878> "Failed class template argument deduction in unevaluated, parenthesized context". That place, as well as uses of OUStringLiteral in extensions/source/abpilot/fieldmappingimpl.cxx and i18npool/source/localedata/localedata.cxx, which have been replaced with OUString::Concat (and which is arguably a better choice, anyway), also caused failures with at least Clang 5.0.2 (but would not have caused failures with at least recent Clang 12 trunk, so appear to be bugs in Clang that have meanwhile been fixed). Change-Id: I34174462a28f2000cfeb2d219ffd533a767920b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102222 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-09-15Online: selection highlight in Calc should follow font size changes.Marco Cecchetti
When user changes font size of selected text, markers and highlight rectangle should be updated. impedit3.cxx: Line had no effect, removed. Lokitsearchtest.cxx: Test had bug. Other changes: LOKit code is separated. Now callback_text_selection is fired when font size is changed (Calc). On Writer it already behaves that way. Change-Id: I9b7e3224ad162bfb7d8f0853b6cb17b4feafa0cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101193 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102465 Tested-by: Jenkins
2020-09-13tdf#124176 Use #pragma once in editengGeorge Bateman
This commit was carried out by a Python script, source of which is at https://bugs.documentfoundation.org/show_bug.cgi?id=124176#c97. Change-Id: Ib435cc551e1fa301bf4ee3e796241e6b9219dc87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102576 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-12replace sal_IntPtr with simple integer typeCaolán McNamara
Change-Id: I5aaf606b684b69641a872b3405b4d4d378289ad4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102466 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-08Fix typo in code+comment (vaules->values)Julien Nabet
Change-Id: I0d225f3defe3996b89640ddd4f61db1412f85dc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102249 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-03Make ImpSvNumberformatScan::GetColor constMike Kaganski
Change-Id: Idbcce18029944ab884cdde03e21190cbb574a00f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102005 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins