summaryrefslogtreecommitdiff
path: root/starmath
AgeCommit message (Collapse)Author
2022-09-15cid#1500440 Use after freeCaolán McNamara
this is the inline starmath editing where you can edit the formula directly in the view window instead of the command window. Currently requires experimental to be enabled. reproduce by clicking in initially empty formula and enter a character. In practice the deleted pos.pSelectedNode is not actually used-after-free in SmCursor::FindPositionInLineList because it is not found by the std::find of pLineList. Change-Id: I57476a8eb073914099c5026dd33dc75b20288d52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140003 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-15Conditional jump or move depends on uninitialised valueCaolán McNamara
==1533286== Conditional jump or move depends on uninitialised value(s) ==1533286== at 0x12DEC3C9: param_double_validate (gparamspecs.c:592) ==1533286== by 0x12DEF924: g_param_value_validate (gparam.c:700) ==1533286== by 0x12DEFA9A: object_set_property (gobject.c:1594) ==1533286== by 0x12DF1F96: g_object_set_valist (gobject.c:2538) ==1533286== by 0x12DF2253: g_object_set (gobject.c:2705) ==1533286== by 0x241E8C44: gtk_adjustment_configure (gtkadjustment.c:833) ==1533286== by 0x23B6310A: (anonymous namespace)::GtkInstanceScrolledWindow::vadjustment_configure(int, int, int, int, int, int) (gtkinst.cxx:8207) ==1533286== by 0x23B63D3D: virtual thunk to (anonymous namespace)::GtkInstanceScrolledWindow::vadjustment_configure(int, int, int, int, int, int) (gtkinst.cxx:0) ==1533286== by 0x36424112: SmGraphicWindow::Resize() (view.cxx:227) Change-Id: Ib81e26b1042e7a5eebd0a2b561f57f7b4eb25dd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140002 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-14move ErrCode to comphelper and improve debug output stringNoel Grandin
need to move it, because modules "below" vcl want to use the debug output method Change-Id: Ibcaf4089a1e0b3fcc0b5189c7ebf1aae90f50b48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139791 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-05Connect new import / export to starmathdante
See: https://gerrit.libreoffice.org/c/core/+/120753 Change-Id: I9b02a4a7b4bc6c132220710573b7672b1a5b1c60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134163 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-05Identify OOo2OasisTransformer and act in consequencedante
Change-Id: I99950e6dd73822ef49f9d4ef1155a5722b748127 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120786 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-03cid#1509261 Dereference after null checkCaolán McNamara
Change-Id: I74cf3eed734bc09abdbca455d9a762b5aeb02481 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139315 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-02[API CHANGE] tdf#150683 a11y: Switch a11y child index to 64 bitMichael Weghorn
With 16k column support in Calc enabled by default in commit 4c5f8ccf0a2320432b8fe91add1dcadf54d9fd58 Date: Tue Mar 8 12:44:49 2022 +0100 change default Calc number of columns to 16384 (tdf#50916) , the number of Calc cells in a spreadsheet is larger than SAL_MAX_INT32, meaning that a 32-bit a11y child index is no more enough and using it resulted in integer overflows in methods handling corresponding Calc cells in the a11y layer. This e.g. had the effect of the Orca and NVDA screen readers not announcing focused or selected cells properly when their a11y child index was out of the 32-bit integer range. Switch the internal a11y child indices to 64 bit to be able to handle this properly internally. Since the platform APIs (at least AT-SPI on Linux and IAccessible2 on Windows; from what I can see LO's macOS a11y bridge doesn't directly expose the child index) are still restricted to 32 bit, larger child indices still cannot be exposed via the platform APIs. As a consequence, use of the the IAccessible2 and AT-SPI methods that use the child index remains problematic in those cases where the child index is larger. However, as an alternative to using the AT-SPI Table interface and the IAccessibleTable/ IAccessibleTable2 interfaces with the child index to retrieve information about a specific cell, both AT-SPI and IAccessible2 also provide interfaces to retrieve that information directly from the cell object (TableCell interface for AT-SPI, IAccessibleTableCell for IAccessible2). Those interfaces are already implemented/exposed for winaccessibility (s. `CAccTable`) and the qt5/qt6/kf5 VCL plugins (s. the `QAccessibleTableCellInterface` methods implemented in `QtAccessibleInterface`). With the switch to 64-bit internal a11y child indices, these now behave correctly for cells with a child index that doesn't fit into 32 bit as well. NVDA on Windows already uses the IAccessibleTableCell interface and thus announcing focused cells works fine with this change in place. Orca on Linux currently doesn't make use of the AT-SPI TableCell interface yet, but with a suggested change to do so [1], announcement of selected cells works with the qt6 VCL plugin with a current qtbase dev branch as well - when combined with the suggested changes to implement support for the AT-SPI TableCell interface in Qt [2] [3] and the LO change based on that [4] and a fix for a nullptr dereference [5]. The gtk3 VCL plugin doesn't expose the AT-SPI TableCell interface yet, but once it does so (via `AtkTableCell`), it also works with the suggested Orca change [1] in place. (Adding that is planned for an upcoming change, works with a local WIP patch.) For handling return values that are larger than what platform APIs support, the following approach has been chosen for now: 1) When the return value is for the count of (selected) children, the maximum value N supported by the platform API is returned. (This is what `ScAccessibleTableBase::getAccessibleChildCount` did previously.) The first N elements can be accessed by their actual (selection) indices. 2) When the return value is the child/cell index, -2 is returned for objects whose index is greater than the maximum value supported by the platform API. Using a non-negative value would mean that the index would refer to *another* actually existing child. A child index of -1 on the other hand tends to be interpreted as "child is invalid" or "object isn't actually a child of its (previous) parent any more)". For the Orca case, this would result in objects with a child index of -1 not being announced, as they are considered "zombies" [6]. What's still somewhat problematic is the case where more than 2^31 children are *selected*, since access to those children still happens by the index into the selection in the platform APIs, and not all selected items are accessible this way. (Screen readers usually just retrieve the first and last element from the selection and announce those.) Orca already seems to apply different handling for the case for fully selected rows and columns, so "All cells selected" or "Columns ... to ... selected" is announced just fine even if more than 2^31 cells are selected. (Side note: While Microsoft User Interface Automation - UIA - also uses 32-bit indices, it also has specific methods in the ISelectionProvider2 interface that allow to explicitly retrieve the first and last selected item, `ISelectionProvider2::get_FirstSelectedItem` and `ISelectionProvider2::get_LastSelectedItem`, but we currently don't support UIA on Windows.) Bound checks at the beginning of the methods from the `XAccessibleContext`, `XAccessibleSelection` and `XAccessibleTable` interfaces that take a child index (or in helper methods called by those) should generally already prevent too large indices from being passed to the methods in the lower layer code that take smaller integer types. Such bound checking has been been added in various places where it wasn't present yet. If there any remaining issues of this kind that show after this commit, they can probably be solved in a similar way (s.e.g. the change to `AccessibleBrowseBox::getAccessibleChild` in this commit). A few asserts were also added at places where my understanding is that values shouldn't be larger than what is supported by a called method anyway. A test case will be added in a following change. [1] https://gitlab.gnome.org/GNOME/orca/-/merge_requests/131 [2] https://codereview.qt-project.org/c/qt/qtbase/+/428566 [3] https://codereview.qt-project.org/c/qt/qtbase/+/428567 [4] https://gerrit.libreoffice.org/c/core/+/138750 [5] https://codereview.qt-project.org/c/qt/qtbase/+/430157 [6] https://gitlab.gnome.org/GNOME/orca/-/blob/82c8542002e36e0d3d918088d583162d25136143/src/orca/script_utilities.py#L5155 Change-Id: I3af590c988b0e6754fc72545918412f39e8fea07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139258 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-09-01cid#1509261 Dereference after null checkCaolán McNamara
Change-Id: Ib6dd69e4610ee6df76cde8446677e0f68bed3e0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139157 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-31cid#1509247 reserve here can't be rightCaolán McNamara
the assumption is that m_aSvXMLElementExportList[m_nDepth] can be written to here, so it should at least be resize not reserve Change-Id: I2bb6074ca9dd2f71e17f5b9ec955e4d6d65edaa9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139098 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-30its not ideal to wait until Paint to set the bg colorCaolán McNamara
set it at construction time Change-Id: I8923ea8f79c4bf18054fc697e2b35caad1b12486 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139024 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-26tdf#150489: Drop Elements docking windowMike Kaganski
and make uno:ElementsDockingWindow open the respective sidebar panel. Change-Id: I9736d6804c579b83404636d5e327c49c2fdeb914 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138458 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-26automatically set TextRenderModeForResolutionIndependentLayout if we scaleCaolán McNamara
Always render glyphs with a mode suitable for rendering of resolution-independent layout positions if we scale the text positions. The idea being to typically continue to use the system defaults for font settings for UI elements, but where we are rendering into application canvases where there's a mapmode set then automatically use a good mode to render that. Change-Id: I0e5857e377da72ae1a2ede1d88d6408819fc9200 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138324 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-18Use combobox for category list on Elements sidebar panelMike Kaganski
And replace GtkPaned with GtkBox: the elements are not expected to have a resize handle between them. Change-Id: I9ba170458754fe28052007e8051d3814dc7d2ea0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138501 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-17Return std::optional instead of using bool* argumentMike Kaganski
Change-Id: I47f03411a6677f22291bea4dc06920ab9052349a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138399 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-17lok: register view callback also for nested sm viewMike Kaganski
This allows to send context change events that originate in the embedded views. Change-Id: I574ca347a2ffa67f9645a2ee790e42088ad8721f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138303 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-15Resolves: tdf#149858 embedded starmath not using correct initial zoomCaolán McNamara
since... commit ea21b870f8549d0110ef65187af50694a06458ca Date: Mon Apr 19 15:22:22 2021 +0100 weld SmGraphicWindow where the outer Window is not directly drawn into any more Change-Id: I70f45590f0fb7ff2f7af80da8873d580d219aca4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138297 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-07Removed duplicated includesAndrea Gelmini
Change-Id: Ic981e0916c68181cab7081091303d18c54912377 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137912 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-08-05clang-tidy modernize-pass-by-value in starmathNoel Grandin
Change-Id: Ib6bd1ed629980d4ff122114bc45396886c94ab78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137842 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-30tdf#150045 Set secondary/explanatory labels apartAdolfo Jayme Barrientos
Rationale in commit 0ebbe1f0080f474fd583e5912c9605e6fb2e13d5, of which this is a follow-up. Change-Id: If75aa32bf02aeb8761f5b7f4ddbbeaa3bdcaab3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137618 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-07-28lok: Properly update sidebar context in MathMike Kaganski
Change-Id: I830c0d9bdeaa6340283eafc3e91251d02602d7aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137247 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-07-28lok: Enable sidebar in MathMike Kaganski
Change-Id: I1554a924eef0bfcaffa893057a37ef45321a0cf7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137246 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-07-25Handle Ctrl+Z / Ctrl+Y in Math graphic window correctlyMike Kaganski
... instead of trying to insert a control character in the formula. Change-Id: Ifcf4d3ce1111a381cd29de310b041c08f7314cff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137402 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-07-25Some refactorMike Kaganski
Change-Id: I58f315e39e33a09585d6325590998ac8195687db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137401 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-07-22elide some makeStringAndClear() callsNoel Grandin
Change-Id: Iccdb04df53bc981e2240240daddf15e9e1bb5a16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137310 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-08[API CHANGE] Drop css::accessibility::XAccessibleStateSetNoel Grandin
which is internal API, unused (as far as I can tell) by external users. This state is purely a bitset (as implemented by utl::AccessibleStateSetHelper) so we can just return it as a 64-bit value. This shaves significant time off the performance profiles of code that loads very complex shapes, because this state is frequently used, and we no longer need to allocate a return value on the heap for every call. Change-Id: Icf1b3bd367c256646ae9015f9127025f59459c2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136786 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-19cid#1506514 Uninitialized scalar fieldCaolán McNamara
Change-Id: I777d9008289b2afb464d1002e8be32072c0a4501 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136099 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-18cid#1504663 workaround Resource leak in objectCaolán McNamara
and cid#1504667 Resource leak in object take a simpler approach over an unordered_map Change-Id: Ie0736dcb0c8e7cdcd3b4b6bd303642841b590bf9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136087 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-09Accessibility for IconViewMike Kaganski
Change-Id: I65ca9d43f70a50e2e95aabfc3b8ba1b15f9ff8be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135226 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-06-09loplugin:unusedmethodsNoel Grandin
Change-Id: Ib89ab59f7ad7e90b2a44ddd122176cde904fba4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135520 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-08gtk: let math GtkIconViews flow to fill available space with iconsCaolán McNamara
Change-Id: I25f3433e9404ac1938568607a9a52a50ca8a7892 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135513 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-07Fix ImageView without text on GTKMike Kaganski
Change-Id: I2c1884722de2d40e96282d1efbba4be0ad078bd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135465 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-06-02Fix typoAndrea Gelmini
Change-Id: Ie7d5a2b2a6fceb09ffcb6b24a462dd6911886a1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135307 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-06-02Use IconView in SmElementsControlMike Kaganski
Allows to send individual images over the wire in lok case, instead of sending full canvas at every scroll operation. The control's horizontal and vertical modes (when it's docked to a vertical or a horizontal parent window side) are now identical. Some TODOs: * Re-implement a11y - that needs to be implemented on IconView level; * Make sure that sub-pixel positioning is not used when creating the elements icons (makes elements look a bit slim on Windows); * Maybe restore mouse hover indication; in non-GTK case, a call to m_xIconView->SetHoverSelection would suffice in SalInstanceIconView. Change-Id: Idbc35f4e38e2b49fd0848a96da557fa2c1a1f6e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134761 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-06-01Fix domainMike Kaganski
Change-Id: I0391fb3d4b913967ed4f8459d6b30f7f39bf4b40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135055 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-05-30fix another domainXisco Fauli
Change-Id: I3a0c5aab62a7b6723df5820abb3f56e3f110d8b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135113 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-05-26ofz#47639 avoid Integer-overflowCaolán McNamara
Change-Id: I3f89238187dfb8cfd7a929d5f5576b83f6ec37c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134982 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-25std::set->o3tl::sorted_vector in MathTypeFontSetNoel Grandin
Change-Id: I8b664f10bee232355eeb431de6b1445d9c797f6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134921 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-24modernize and improve PropertySetInfoNoel Grandin
(*) use o3tl::span for the array param, which means we don't need a null entry to terminate the array (*) use std::unordered_map to speed things up (*) mark the array as static at a few more call sites Change-Id: I05b6cae7552f44459e183ec05cb94e60edb3bfe0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134832 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-23elide some OUString allocationNoel Grandin
Change-Id: I5f0b9057b86ec98b66b4ce2d6c681b8cb93d49e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134802 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-23starmath: fix real use-after-free detected by GCC 12Michael Stahl
In file included from starmath/inc/mathml/iterator.hxx:12, from starmath/source/mathml/iterator.cxx:10: In member function ‘SmMlElement* SmMlElement::getParentElement()’, inlined from ‘void mathml::SmMlIteratorBottomToTop(SmMlElement*, runType, void*) [with runType = void (*)(SmMlElement*, void*)]’ at starmath/inc/mathml/iterator.hxx:43:39, inlined from ‘void mathml::SmMlIteratorFree(SmMlElement*)’ at starmath/source/mathml/iterator.cxx:57:28: starmath/inc/mathml/element.hxx:263:46: error: pointer ‘pCurrent’ used after ‘void operator delete(void*, std::size_t)’ [-Werror=use-after-free] 263 | SmMlElement* getParentElement() { return m_aParentElement; }; | ^~~~~~~~~~~~~~~~ In function ‘void mathml::deleteElement(SmMlElement*, void*)’, inlined from ‘void mathml::deleteElement(SmMlElement*, void*)’ at starmath/source/mathml/iterator.cxx:19:20, inlined from ‘void mathml::SmMlIteratorBottomToTop(SmMlElement*, runType, void*) [with runType = void (*)(SmMlElement*, void*)]’ at starmath/inc/mathml/iterator.hxx:65:21, inlined from ‘void mathml::SmMlIteratorFree(SmMlElement*)’ at starmath/source/mathml/iterator.cxx:57:28: starmath/source/mathml/iterator.cxx:19:77: note: call to ‘void operator delete(void*, std::size_t)’ here 19 | static inline void deleteElement(SmMlElement* aSmMlElement, void*) { delete aSmMlElement; } | ^~~~~~~~~~~~ Change-Id: I09acfe3f7e90bd7f919cfba161f72bdd7a8da70a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134742 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-05-21elide OUString allocationNoel Grandin
Change-Id: I45cc3b8df0c29237b69cab87f0fbb6853776394f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134701 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-20new loplugin:unnecessary lockingNoel Grandin
off by default, since each warning needs careful inspection Change-Id: I805c1d1cdde531a1afdc76e87b22f879fc3c9753 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134641 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-19Simplify SmElementsControlMike Kaganski
Change-Id: Idcb075a474b440447b8566cc92a8f65bbc77127c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134643 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-05-19the size table in MathType can be compile-time dataNoel Grandin
Change-Id: Ie0769509e38d3414bf227d8d2b7248461bc41aa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134598 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-18GtkCellRendererText 'text" attrib is the index of the text into the modelCaolán McNamara
and we need a trailing "id" column for [s|g]et_id which is assumed to exist Change-Id: Icb32e78ac76443cc15ca70f2e9248b92791b7890 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134494 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-17Simplify the UIMike Kaganski
Remove the intermediary containers, keeping those that are really needed to create the necessary structure. I'm curious, how much CPU could be wasted by the unused container layers when calculating the layout. Change-Id: I56bf13c52b4e14dcef6595d00223cd36f48793d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134463 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-17Use structured binding to clarify the codeMike Kaganski
Change-Id: I6b1c0532a64a18d961b7ab112675213eea2fd121 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134438 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-05-17use reserve before filling some vectorsNoel Grandin
Change-Id: Ib2ae513de46b2a0c16101747540ba09a7cdfb018 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134481 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-17tdf#65067 Remove excessive spacing from Formula objectsRafael Lima
As described in bugs tdf#65067, tdf#103816, tdf#149052 and a few other duplicates, Formula objects in Writer receive 2 unnecessary spacings: 1) From the "Formula" frame style, which has a Left/Right internal spacing of 0.2cm 2) From the Math formula editor itself, that adds an additional 1pt of internal spacing (left/right) In MS Word the default behavior is setting all of these spaces to zero, which makes the formula flow better alongside text in paragraphs. Therefore, this patch set both of these spaces to Zero so that Formula objects in Writer behave similarly as Formulas in MS Word. Change-Id: Iedcef7124afed6b799f85bcefe37016c8fd972e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134185 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>