summaryrefslogtreecommitdiff
path: root/editeng
AgeCommit message (Collapse)AuthorFilesLines
2022-06-27tdf#148820 sc: fix conditional formatted cell colorBalazs Varga1-2/+10
Store foreground color for color filtering, because in OOXML the foreground color is used for color filtering and we overwrote it with the background color which is used for conditional formatted cells too. Regression from commit: 6f908b48373b71d45c8119b296b0504fb586f6f8 (tdf#143104 Fix xlsx import/export of color filter colors) Change-Id: I737e6f1170851822a2689fa477db59e62f0d47fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136055 Tested-by: Jenkins Tested-by: Gabor Kelemen <kelemeng@ubuntu.com> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> (cherry picked from commit 415dc3bb1c03dbdbc3cbca274bc435ac7557ba2d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136457 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136479
2022-06-13remove incorrect #ifdef DBG_UTIL around normal code (tdf#149476)Luboš Luňák1-5/+1
This code sets sufficient size for the virtual device that saves the content, so it's not some optional debug code. Without this selecting text in Calc formula bar and dragging it around leaves artifacts, because the saved content is not large enough to restore the original widget content. This dates back to d51fe1189dcbe0fe06805c8d99687c125cd254eb, which supposedly made the code warning-free (and also correct-free). Change-Id: I52dab8c8d3a083fff9da8aed27facdf21076622e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135555 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit dabf52b81621f1cbff508dfb7ae2e92597e521c3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135536 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
2022-06-09tdf#145603 Drag-n-drop in formula bar creates mismatchNoel Grandin1-2/+0
Revert commit 60d35f767781de4b8f1e7b264b12015f655c647d tdf#132740 don't broadcast if modified status has not changed Change-Id: I5a0292499522e21708a2d5607966e4c2b3a18ba0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135301 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 0030fa0d5174b45ae7f99e3ae923bbec83e50cd1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135264 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-09tdf#143964 insert/overwrite cursor shape lags in formula editingNoel Grandin1-3/+0
Revert "tdf#132740 bypass work if selection has not changed" This reverts commit 865641047be4a693f7a51635ce06eab15675126d. Change-Id: I69244a1e57ce979bf21946e31df7165f8791423c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 30703dbe59e909e257876524785836e7f4d993b2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135265 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-25tdf#149079 don't skip disposing DnDListenerCaolán McNamara1-10/+10
even if there is no longer a DropTarget don't return early and omit to inform listeners of the disposing Change-Id: I6ce7fe1664049a9e0a88b549b1c8c94ec8072c1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134193 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-04-19tdf#148620 Crash in Draw using Format > Lists > Move DownNoel Grandin11-386/+429
This reverts commit 35f03f26799747894d1534796b6cb227bd4f233b speed up loading large ODS a little since ImpEditEngine::ImpMoveParagraphs wants to manipulate ParaPortion's and also identify them by pointer Also convert the OSL_ASSERT in this method to an assert to catch such problems earlier Change-Id: Id924d00c9524223db9a96e487b331ce60e3a4fff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133128 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133165 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-02-21tdf#147166 EditTextObjectImpl copy ctor doesn't exactly copy EditTextObjectImplCaolán McNamara1-0/+1
and this is apparently relied on, so eliding the copy gives unexpected results. EditTextObjectImpl::Clone returns a copy of *this, but the EditTextObjectImpl copy ctor explicitly does not copy the "PortionInfo" member, so in: commit fb8973f31f111229be5184f4e4223e963ced2c7b Author: Caolán McNamara <caolanm@redhat.com> Date: Sat Oct 10 19:21:38 2020 +0100 ofz#23492 the only user of this ctor throws away the original of the clone so we can take ownership of the original instead where the copy was optimized away we want from a state where there was a new EditTextObjectImpl with an empty PortionInfo member to one where the PortionInfo of the EditTextObjectImpl was retained. So explicitly clear this unwanted info. It's very hard to make rational judgements about code if a copy behaves differently than the orignal :-( Change-Id: I642d60841d6bdccbf830f8a2ccdbd9f542a8aa18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130158 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-02-18tdf#143709 - Create repaint rectangle with the old text sizeAndreas Heinisch1-4/+4
Otherwise, the repaint rectangle uses the new text size, which may lead to visual artifacts, if the old text size exceeds the new one. Change-Id: I9b49755bf6b8c453e319e2a4081d58bf2e433cd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129920 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> (cherry picked from commit 7c00544d672f0fc0f08c12f5fd9cd53fdbe96733) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129935 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-02-14lokCalcRTL: fix editing of shape textDennis Francis3-6/+41
Inform editeng that negated document x coordinates are used in this case and ensure that editeng generated invalidation rectangles always have positive X coordinates. Conflicts: sc/source/ui/view/gridwin4.cxx Change-Id: I2e450707ce02f7bcd8e4d299f857c37ebbd5e2c6 (cherry picked from commit 0fe02bb99e5dfa8379a49de75683fc350e4c4dbd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129360 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2022-02-14lokCalcRTL: selection coords should be mirrored w.r.t output areaDennis Francis2-4/+12
Conflicts: editeng/source/editeng/impedit.cxx editeng/source/editeng/impedit.hxx Change-Id: I52bbbd4ca69a599c90c00d25513064b025f72bf4 (cherry picked from commit 04a48ea15b9e692ded4f3012b41e765451669e46) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128900 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2022-02-14lokCalcRTL: text cursor pos should be mirrored w.r.t output areaDennis Francis1-0/+7
Change-Id: Ied4e02d2dd30b7132ea1bc5f0d5b717355ed8b4f (cherry picked from commit 92d2035acc9d13fea46003a2b2650439d6a2f2fb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128897 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2022-02-14use more cppu::BaseMutexNoel Grandin1-5/+5
Change-Id: Iddd7438161ead93b27cf8e8058ca5b1eae3d8001 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-14lok: ensure no more tunneled spellchecking menuHenry Castro1-8/+2
Change-Id: Ic79d9b6d606573d93830347390c6466b033e9f12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120963 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129460 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2022-01-20Resolves: tdf#139974 Do not munge character after forced line breakEike Rathke1-2/+4
A classical +-1 error.. Change-Id: I8b6bc0843fa585d8a710c74f757098ab9c6f823d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128637 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 2cfa04cbf03fe5c2ce32a7384082cdc5de5a4785) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128541 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-01-11editeng: avoid writing past the end of of pLine->GetCharPosArray()Miklos Vajna1-2/+8
Thread 1 "soffice.bin" received signal SIGSEGV, Segmentation fault. 0x00007ffff6df4951 in ?? () from /usr/lib64/libstdc++.so.6 (gdb) bt 10 #0 0x00007ffff6df4951 in () at /usr/lib64/libstdc++.so.6 #1 0x00007ffff6df5792 in __gnu_debug::_Error_formatter::_M_error() const () at /usr/lib64/libstdc++.so.6 #2 0x00007ffff47384bf in std::__debug::vector<int, std::allocator<int> >::operator[](unsigned long) (this=0x6b3dca0, __n=7) at /usr/include/c++/7/debug/vector:417 #3 0x00007ffff47b5440 in ImpEditEngine::ImpBreakLine(ParaPortion*, EditLine*, TextPortion const*, int, long, bool) (this= 0x1ce0040, pParaPortion=0x206a010, pLine=0x6b3dca0, pPortion=0x6b3e480, nPortionStart=0, nRemainingWidth=5093, bCanHyphenate=false) at editeng/source/editeng/impedit3.cxx:2041 #4 0x00007ffff47b1fb6 in ImpEditEngine::CreateLines(int, unsigned int) (this=0x1ce0040, nPara=0, nStartPosY=0) at editeng/source/editeng/impedit3.cxx:1352 #5 0x00007ffff47ad0c2 in ImpEditEngine::FormatDoc() (this=0x1ce0040) at editeng/source/editeng/impedit3.cxx:387 #6 0x00007ffff47bf516 in ImpEditEngine::FormatAndLayout(EditView*, bool) (this=0x1ce0040, pCurView=0x0, bCalledFromUndo=false) at editeng/source/editeng/impedit3.cxx:4190 #7 0x00007ffff47be333 in ImpEditEngine::SetUpdateLayout(bool, EditView*, bool) (this=0x1ce0040, bUp=true, pCurView=0x0, bForceUpdate=false) at editeng/source/editeng/impedit3.cxx:3927 #8 0x00007ffff46f059e in EditEngine::SetUpdateLayout(bool, bool) (this=0x1ce2b20, bUpdate=true, bRestoring=false) at editeng/source/editeng/editeng.cxx:1472 #9 0x00007ffff48ce5e3 in Outliner::SetText(OutlinerParaObject const&) (this=0x1ce0cc0, rPObj=...) at editeng/source/outliner/outliner.cxx:586 (More stack frames follow...) (gdb) frame 3 #3 0x00007ffff47b5440 in ImpEditEngine::ImpBreakLine (this=0x1ce0040, pParaPortion=0x206a010, pLine=0x6b3dca0, pPortion=0x6b3e480, nPortionStart=0, nRemainingWidth=5093, bCanHyphenate=false) at editeng/source/editeng/impedit3.cxx:2041 2041 pLine->GetCharPosArray()[ nPosInArray ] = rTP.GetSize().Width(); (gdb) print pLine->GetCharPosArray() [Thread 0x7fffd2010700 (LWP 5008) exited] $1 = std::__debug::vector of length 7, capacity 7 = {707, 1414, 2121, 2828, 3535, 4242, 4949} (gdb) print nPosInArray $2 = 7 Change-Id: I3a8121c0c0a3b0949e91eb53c0468f7e629b146f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128223 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins (cherry picked from commit 56ded398c9c72810f20b9da0aa98097739423180) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128231 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-12-21tdf#133713 sd: bullets and numbering should enable itJustin Luth1-0/+29
This fixes a LO 6.3 regression caused by re-working the numbering dialog (switching from FuOutlineBullet to the new FuBulletAndPosition). When running uno:OutlineBullet, one expects to have numbering applied to the selection. However, that part was completely omitted from the new implementation. I can't imagine why, since most everything else in the nearby code was just a copy/paste from the old methods. This patch restores some of the logic from the old function. [Deleted in commit 5ff162bede44b77cb19e5ff6571b6e34f228d9fb Author: Gül?ah Köse on Mon May 27 23:49:41 2019 +0300 tdf#120905 Remove old FuOutlineBullet dialog code.] Partially revert loplugin:unusedmethods to recover EnableBullets() from commit cae829e9c1394851fc88829d5197460929c2792a This fixes Format -> Bullets and Numbering, right-click pop-up Bullets and Numbering, and sidebar's Toggle * List's "More Numbering". Change-Id: Iee3b66bd715e92167c9423242627a996191dcb72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126904 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 12832284318125b8649f6a67e3aa12aa953afdfb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127176 Reviewed-by: Justin Luth <jluth@mail.com>
2021-12-13tdf#146179: fix Dev Tools crash when inspecting object in special fileJulien Nabet1-0/+4
0 0x00007f3177297361 in SvxUnoTextBase::createEnumeration() (this=0x313ba98) at editeng/source/uno/unotext.cxx:1911 1 0x00007f317729751d in non-virtual thunk to SvxUnoTextBase::createEnumeration() () at editeng/source/uno/unotext.cxx:1918 2 0x00007f31755c2a7b in (anonymous namespace)::GenericPropertiesNode::fillChildren(std::unique_ptr<weld::TreeView, std::default_delete<weld::TreeView> >&, weld::TreeIter const*) (this=0x7ffee92c8140, pTree=std::unique_ptr<weld::TreeView> = {...}, pParent=0x0) at sfx2/source/devtools/ObjectInspectorTreeHandler.cxx:719 3 0x00007f31755c15f1 in ObjectInspectorTreeHandler::appendProperties(com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&) (this=0x8e499d0, xInterface=uno::Reference to (SvxPluginShape *) 0x313b8e0) at sfx2/source/devtools/ObjectInspectorTreeHandler.cxx:1270 4 0x00007f31755c0e85 in ObjectInspectorTreeHandler::NotebookEnterPage(rtl::OString const&) (this=0x8e499d0, rPageId="object_inspector_properties_tab") at sfx2/source/devtools/ObjectInspectorTreeHandler.cxx:1154 5 0x00007f31755befa0 in ObjectInspectorTreeHandler::LinkStubNotebookEnterPage(void*, rtl::OString const&) (instance=0x8e499d0, data="object_inspector_properties_tab") at sfx2/source/devtools/ObjectInspectorTreeHandler.cxx:1129 ... (gdb) p GetEditSource() $2 = (SvxEditSource *) 0x0 See full bt here: https://bugs.documentfoundation.org/attachment.cgi?id=176872 Change-Id: I1f3f48c742a2a3c6a2abcb2ed06d8f60e6f7a77f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126666 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit a5f2f989a0a7a5b602b7f3e39e99d7f4c2342cee) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126678 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-12-09tdf#145671 Don't open URL twice in cell edit modeSamuel Mehrbrodt2-3/+6
Change-Id: I8a324d6a037c8a5c0efc0b2825657513c2f9841c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126159 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> (cherry picked from commit b9362e87a3646a6693b81fb0d40e28ce7813a251) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126441 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-11-24ofz#41345 Negative-size-paramCaolán McNamara1-6/+6
Change-Id: I7398fc39c84670f455993c80ea6c9defbcf911d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125752 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-24PPTX import: implement native handling of a color's luminance offsetMiklos Vajna1-3/+19
This was already handled in oox/ at import-time: this adds it to the doc model, including UNO API and PPTX import. This is a dependency PPTX export and UI, and also the last transform which is easy to generate from the PowerPoint UI and we didn't import to the doc model. Change-Id: Ica4e738d8dc8e0409160ceab941a82f2475ddc68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125749 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-11-23O[U]String::replaceAt overloads that take string_viewNoel Grandin5-10/+10
which results in lots of nice string_view improvements picked up by the plugins Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23PPTX import: implement native handling of a color's luminance modulationMiklos Vajna1-3/+19
This was already handled in oox/ at import-time: this adds it to the doc model, including UNO API and PPTX import. This is a dependency PPTX export and UI. Change-Id: I5d875b53d715beb10c13ef616d06cf958d43f70f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125684 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-11-23cui, editeng, sw: WrdStt -> WordStartMiklos Vajna2-41/+41
Because I'm unable to remember if Stt is Start or Stat. Change-Id: Ie853c6e94e45c3e14e002a0218d11c61905a3180 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125672 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-11-22Use less DegreeN::get()Mike Kaganski1-2/+2
Change-Id: I97b8d6282c72307cc29a913af221d283523f2fae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125653 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-20tdf#133835 speedup calc autofilter (2)Noel Grandin1-0/+2
Tweak ImpEditEngine::SetRotation to avoid doing work when nothing has changed, saves 10% Change-Id: I10db2415278908e9e36491950a5f4826e01f42fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125564 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-19Drop F_PI1800/F_PI18000, and unify deg2rad/rad2deg conversionsMike Kaganski2-3/+3
Change-Id: Ib89b00c3dc8cd440e8a88906eea133becd1cef64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125509 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2021-11-19PPTX import: handle <a:clrScheme name="...">Miklos Vajna1-1/+3
We had doc model for this, but the UNO API and the PPTX import was missing. Change-Id: I199e9cc235a783d91700ce74f17d442f41d3c3f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125532 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-11-16WrtStt->WrdStt for consistency with the other word start abbrevsCaolán McNamara1-1/+1
Change-Id: I4ec773b5867d804d9c293c4c89cb9be4acb017b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125315 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-16Related: tdf#142719 first time undo adds an exception it gets lostCaolán McNamara1-2/+1
Change-Id: Ie963e92a15ddd45316f999e950fff359d7dd6f5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125314 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-16Theme color and tint/shade attribute for SvxColorItemTomaž Vajngerl1-4/+39
To support theme colors the SvxColorItem must be extended with an optional attribute theme index to define the index to which theme color current color belongs and an optional tint/shade attribute define how much the color ha been additionally tinted or shaded. [ Miklos: left out the potentially breaking svx/sdi/svxitems.sdi changes. ] (cherry picked from commit ccdbf815e00dbe2ba21f7e86b6743df100b7401f, from the feature/themesupport2 branch) Change-Id: Ifb0481770be675181dafa94cd2778f374fcf3c7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125296 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-11-13Use o3tl::convertMike Kaganski1-2/+2
Change-Id: I78db3001d602ec1a0847785b3c127b9d345f5af7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125173 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-13tdf#145610: lists should not have includeUpperLevels < 1Vasily Melenchuk1-0/+7
Unlike its name, this variable stores *total* amount of levels to includes, so during conversion even empty list format to prefix/suffix/includeupperlevels we should keep last one above zero so list even in future will not have issues with levels to display. Change-Id: I4992c1ac0194f381df9f7b965ecdb2d688892b30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125022 Tested-by: Jenkins Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de>
2021-11-10rtl::Static to thread-safe staticNoel Grandin1-1/+0
Change-Id: Ie4c26b0b2c0880bcf6ec6d786b219f142d715af5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124930 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-09Check pOutWin before use in ImpEditView::DeselectAllSzymon Kłos1-1/+1
Change-Id: I47e417d61093f1845a1541a65d2047ab8dc0b7d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124325 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> (cherry picked from commit e62b40b056120bb5eebf00fc88f58fe042356520) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124486 Tested-by: Jenkins
2021-11-04tdf#48622 Add new border line width defaultsSamuel Mehrbrodt1-2/+2
* Hairline (0.05pt) * Very thin (0.5pt) * Thin (0.75pt) * Medium (1.5pt) * Thick (2.25pt) * Extra thick (4.5pt) This unifies the default border line widths throughout the program. Users can still set any line width they want by chosing "Custom" in the "Border" tabpage. Also, existing documents won't be changed. The new defaults are just for newly added borders. Change-Id: I7af85dc189a688a749812824508c33c7814b50f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122683 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-10-31add o3tl::span ctor from std::vectorLuboš Luňák2-3/+3
Makes code simpler, and std::span can be constructed from std::vector too. Change-Id: Iae26b53c52148c19d9068a63126a7393d098d654 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124507 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
2021-10-30tools::Long->sal_Int32 in GetCaretPositionsNoel Grandin1-1/+1
Change-Id: Id3f037e132a4d07cb2b68dbb93dd24f7f6b33ab6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124461 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-30tools::Long->sal_Int32 in the DX arraysNoel Grandin10-31/+31
Change-Id: I36ddc11b39763dc77086591fe9bb756195b4294f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124459 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-30Prepare for removal of non-const operator[] from Sequence in editengMike Kaganski5-29/+35
Change-Id: Ibdf2db715cb85481342db2a72f27bea6a5b73b7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124360 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-29pass DX array around using o3tl::span instead of pointerNoel Grandin6-16/+17
so we get bounds checking in debug mode Note that I cannot just pass around the std::vectors involved because there is a place in editeng which calls with a subset of a vector. Change-Id: I5088a139593c27bf9cbe5d843ab4b0048ac6d508 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124330 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-19Use MsLangId::getConfiguredSystemLanguage()Eike Rathke1-1/+1
Change-Id: I298f762ac7f3298aa9cb9621ad1f8cae50527b24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123790 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-10-16adapt to the variable name change from pPortion to rPortion since 35f03f26Tomoyuki Kubota1-1/+1
Change-Id: I8ed79957a464ab15e439ebfff5b7d338ed774288 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123632 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-15Remove non-const Sequence::begin()/end() in internal codeMike Kaganski1-1/+1
... to avoid hidden cost of multiple COW checks, because they call getArray() internally. This obsoletes [loplugin:sequenceloop]. Also rename toNonConstRange to asNonConstRange, to reflect that the result is a view of the sequence, not an independent object. TODO: also drop non-const operator[], but introduce operator[] in SequenceRange. Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-14[API CHANGE] Fix all bad UNOIDL identifiers across offapiStephan Bergmann1-1/+1
Identifiers containing underscores must start with an uppercase letter. (So that the UNO implementation can use identifiers containing underscores and starting with a lowercase letter for internal purposes, see e.g. the static_type member functions in the C++ *.hdl files. idlc checks that with the -cid option, while unoidl-write silently allows bad identifiers for now, see the TODO in unoidl/source/sourceprovider-scanner.l, which can be dropped after this change.) All of the affected identifiers were present since early OOo times, but none of them appear to be used much, at least not across LO itself, so there is hope that we can get away with these incompatible changes. (For the constant group members, we could roll this out in two steps, introducing the new members alongside the old ones and deprecating the old ones in a first step, then removing the old, deprecated ones in a second step, so that third-party code would have more time to adapt. But that would not work for the enum members and interface methods, so just do all of this in one breaking step.) udkapi happened to not contain any bad identifiers. Change-Id: If2d4c16563606f9efb48b937c76af54746377428 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121725 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-14Use more appropriate return type for some editeng functionsStephan Bergmann4-44/+44
...whose return values are OUString-length related: * ContentNode::GetExpandedLen from sal_uLong to sal_Int32 * EditDoc::GetTextLen from sal_uLong to sal_Int32 * EditEngine::GetTextLen from sal_uInt32 to sal_Int32 Change-Id: Ia5156e247906728e2130b321af15cda7669108ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123576 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-11In O[U]StringBuffer, make string_view params replacements for OUString onesStephan Bergmann2-2/+3
...for LIBO_INTERNAL_ONLY, instead of having them as additional overloads. That way, loplugin:bufferadd and loplugin:stringviewparam found many further opportunities for simplification (all addressed here). Some notes: * There is no longer an implicit conversion from O[U]String to O[U]StringBuffer (as that goes via user-defined conversions through string_view now), which was most noticeable in copy initializations like OStringBuffer buf = someStr; that had to be changed to direct initialization, OStringBuffer buf(someStr); But then again, it wasn't too many places that were affected and I think we can live with that. * I made the O[U]StringBuffer ctors taking string_view non-explicit, mainly to get them in line with their counterparts taking O[U]String. * I added an OUStringBuffer::lastIndexOf string_view overload that was missing (relative to OUStringBuffer::indexOf). * loplugin:stringconstant needed some addition to keep the compilerplugins/clang/test/stringconstant.cxx checks related to OStringBuffer::append and OStringBuffer::insert working. * loplugin:stringviewparam no longer needs the special O[U]StringBuffer-related code that had been introduced in 1250aecd71fabde4dba990bfceb61bbe8e06b8ea "loplugin:stringviewparam extend to new.." Change-Id: Ib1bb8c4632d99b744e742605a9fef6eae959fd72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122904 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-10loplugin:moveparam in editengNoel Grandin4-6/+6
Change-Id: I08aed09b0acd283d700bdf75f650e93dba7c7b85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123341 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-09Typo: braket->bracketJulien Nabet2-18/+18
Change-Id: I75c8c0fc15acb7e3ae6e59de91d5d9f67a4cd1ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123317 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-09Typo *ropertie -> *ropertyJulien Nabet1-1/+1
Change-Id: Id5ae03140ac4fd67bf4940569ac5cd2f15716749 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123306 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-08use SfxItemSetFixed in editengNoel Grandin6-10/+8
Change-Id: I892a69d50f7d641f9a941a55c7b3952d1c59c435 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123144 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>