summaryrefslogtreecommitdiff
path: root/editeng
AgeCommit message (Collapse)AuthorFilesLines
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>
2021-10-07loplugin:moveparam in editengNoel Grandin4-8/+8
Change-Id: Id8118e5f5b7acbff4f04935560c663b36093a5fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123189 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-04tdf#144578: numbering: generate include upper levels for UIVasily Melenchuk1-1/+11
In spite of used list format in ODF for UI we still need to show prefix/suffix (already was there) and included upper levels (done in this patch) for correct visualization of level properties. Moved initialization of ListLevel to later steps to avoid overriding of generated values for prefix, suffix and IncludeUpperLevel by some invalid values. Change-Id: I5d132426c06021ed526d16fb09276523105aa7b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122686 Tested-by: Jenkins Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de>
2021-10-03drop 'using namespace std' in desktop, e*, f*Julien Nabet2-8/+5
Change-Id: I277dc957798093001f9a3935f97db8ac0314e6a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123022 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-01loplugin:constmethodNoel Grandin5-12/+12
Change-Id: I3ed657c5c5e6840e38e3c8505505b4b372125df0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122910 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-30loplugin:constmethod handle more casesNoel Grandin1-2/+1
remove some of the naming limitations, and handle pointer parameters better. I only let the plugin run up till vcl/ Change-Id: Ice916e0157031ab531c47f10778f406b07966251 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-28gives names to all the Idles and TasksNoel Grandin2-3/+3
enforce it by making the constructor parameter non-default. Change-Id: I321543e4dcf15ea0a43ad8cce91d2f8dc22df6ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122766 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-28vcl: rename OutDevState to StackChris Sherlock4-16/+16
I have moved the header file to include/vcl/rendercontext as this will eventually be part of the RenderContext split from OutputDevice. State and associated enums have also been moved to the vcl namespace. I have also moved ComplexTextLayoutFlags into the vcl::text namespace. Change-Id: I0abbf560e75b45a272854b267e948c240cd69091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121524 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-09-26use SfxItemSetFixed in variousNoel Grandin1-1/+1
Change-Id: Ie2472959dbab93ead20948245fca9644de834422 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122653 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-22Extend loplugin:stringviewparam to starts/endsWith: editengStephan Bergmann1-15/+20
Change-Id: Ic275bbd167e69060f6442ceed6c4dd88733d5e1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122486 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-21vcl: remove OutputDevice's GetDevFontSizeCount() and GetDevFontSize()Chris Sherlock1-3/+1
The OutputDevice::GetDevFontSize() function is only used for non-scalable (bitmap) fonts. We have stopped supporting bitmap fonts since LO 5.3, see tdf#103514: Support for bitmap-only fonts on Windows has been removed (Khaled Hosny) I found the following when removing PhysicalFontFace::SetBitmapSize(): 1. as mnHeight and mnWidth and not set by anyone, I realized I could remove them, which meant removing GetHeight() and GetWidth() 2. PhysicalFontFamily::GetFontHeights() populates heights from the collection of font faces into a sorted vector of font heights taken from PhysicalFontFace. As this no longer exists this function serves no purpose, it has been removed. 3. PhysicalFontFamily::GetDeviceFontSizeList() calls upon PhysicalFontFace::GetFontHeights(). This function takes this sorted list of font heights, and then populates and returns a new list of sizes (or rather, heights). As the heights aren't available any more, this function is also unneeded, so it has been removed. 4. OutputDevice::GetDevFontSizeCount() calls upon PhysicalFontFamily::GetDeviceFontSizeList(). This function has the side effect of initializing the list of fonts. 5. When I checked what calls on GetDevFontSizeCount(), there is only one caller - FontList::GetSizeAry() in svtools. The function returns a standard font size list if the family name is empty, or there are no font sizes (via OutputDevice::GetDevFontSizeCount()). As this will *always* be empty (see chain above) then this function just needs to always return a standard font size list. Thus OutputDevice::GetDevFontSizeCount() and GetFontSizeList() are no longer called upon by anything, so they can be removed. 6. svtool's FontList::GetSizeAry() no longer uses the FontMetric parameter, so this has been removed from the function signature, and cleanup done of the function that calls upon it in svtools, framework, editeng, and desktop. A number of variables that were no longer used due to this change were also removed. 7. This change removed the need for the mpSizeAry unique_ptr in FontList. ImplFontListFontMetric::GetDevice() and mpDevice could also be removed as it was no longer used anywhere. 8. After simplifying GetSizeAry(), it turns out it was the same as GetStdSizeAry(), so removed FontList::GetSizeAry() and used FontList::GetStdSizeAry() in its place. 9. Changing to use GetStdSizeAry() revealed that FontSizeBox::Fill() no longer used the pFontMetric paramter, so this was removed, and call sites updated. 10. Due to change to Fill(): a. SvxFontSizeBox_Base::UpdateFont() no longer uses the const css::awt::FontDescriptor& rCurrentFont parameter, so removed this. This also removed the member variable m_aCurrentFont b. SvxCharNamePage::FillSizeBox_Impl() had a number of newly unused variables removed. c. SwStdFontTabPage::Reset() and SwStdFontTabPage::LoseFocusHdl() had a number of newly unused variables removed. Change-Id: If840e240155c36ed351c63e3136b5b44bb058697 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121932 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-20be more disciplined with SetUpdateLayout on editengineNoel Grandin7-32/+53
save/restore in more places, and check in more places before doing layout, so we dont waste time on expensive layout Change-Id: I311f1f7f97a508da296078e936cb3704938dfdc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121687 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-20clean up ambiguous confusing rectangle APIs like IsInside()Luboš Luňák7-17/+17
Reading 'rectA.IsInside( rectB )' kind of suggests that the code checks whether 'rectA is inside rectB', but it's actually the other way around. Rename IsInside() -> Contains(), IsOver() -> Overlaps(), which should make it clear which way the logic goes. Change-Id: I9347450fe7dc34c96df6d636a4e3e660de1801ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122271 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
2021-09-20no need to allocate SfxItemSet separately in SvxOutlinerForwarderNoel Grandin1-12/+12
Change-Id: I6042993749b5e0b841e82e3b6930e656b88c7fd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122327 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-18ofz#24932 Avoid timeoutCaolán McNamara1-1/+1
Change-Id: I0bcd5490c05a28971f130b387bdc8bcd781ad441 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122304 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-15loplugin:constvarsNoel Grandin2-2/+2
Change-Id: I9b35d6333afa6b305bf73fc55a7e60c8365674e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122134 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>