summaryrefslogtreecommitdiff
path: root/starmath
AgeCommit message (Collapse)AuthorFilesLines
2 daysRemoved duplicated includesAndrea Gelmini1-1/+0
Change-Id: Ic981e0916c68181cab7081091303d18c54912377 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137912 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
4 daysclang-tidy modernize-pass-by-value in starmathNoel Grandin12-24/+34
Change-Id: Ib6bd1ed629980d4ff122114bc45396886c94ab78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137842 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
10 daystdf#150045 Set secondary/explanatory labels apartAdolfo Jayme Barrientos1-0/+3
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>
12 dayslok: Properly update sidebar context in MathMike Kaganski1-31/+1
Change-Id: I830c0d9bdeaa6340283eafc3e91251d02602d7aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137247 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
12 dayslok: Enable sidebar in MathMike Kaganski1-3/+36
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 Kaganski1-0/+7
... 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 Kaganski2-91/+91
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 Grandin2-3/+3
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 Grandin2-14/+12
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 McNamara2-5/+8
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 McNamara3-50/+34
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 Kaganski1-4/+2
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 Grandin2-10/+0
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 McNamara2-2/+0
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 Kaganski1-0/+1
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 Gelmini1-1/+1
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 Kaganski13-1904/+165
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 Kaganski1-1/+1
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 Fauli1-1/+1
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 McNamara1-0/+1
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 Grandin2-3/+4
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 Grandin5-41/+35
(*) 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 Grandin1-4/+3
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 Stahl1-1/+5
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 Grandin1-1/+3
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 Grandin1-3/+1
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 Kaganski3-362/+409
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 Grandin2-11/+12
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 McNamara1-1/+3
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 Kaganski1-102/+42
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 Kaganski1-4/+4
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 Grandin1-0/+1
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 Lima1-1/+1
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>
2022-05-16use explicit translatable="no" like we typically do in this caseCaolán McNamara1-4/+8
Change-Id: I6dfcca43fbeace4a75878f0eebe57289b221c4fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134388 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-14elid some OUString construction in SmXMLExportWrapper::ExportNoel Grandin1-13/+20
Change-Id: Icc091a7fab3c9ce368bd45536de1e75d29431c56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134314 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-13use vector as backing for stackNoel Grandin1-1/+3
which is a little faster Change-Id: Id086b67eba3ec00dc86a48a0fdec1a467b600d1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134268 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-13tdf#121740 reduce cost of mathml parsingNoel Grandin7-46/+44
by re-using OUString instances instead of allocating new ones for each SmToken Change-Id: Ia897427d6c1ffeb0e741dea90fde1f4d56a70175 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134264 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-11cache the PropertySetInfo in lcl_createModelPropertyInfoNoel Grandin1-2/+3
we only need one of them Change-Id: I2f6f2c75da96f76d4bf9cb31ef31bf597a3f5e6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134159 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-11reserve vector space in SmSymbolManager::GetSymbolsNoel Grandin1-0/+1
Change-Id: I9101e07fa54e35f1cec9797deaf1647763c9ebfe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134158 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-06tdf#148962 starmath's UnicodeNotationToggle (alt+x) getting called twiceCaolán McNamara1-1/+3
Change-Id: Ib150e4825c547c19a30c7b66d3f33904b814a917 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133942 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-05loplugin:unusedvariableplusNoel Grandin1-1/+0
Change-Id: Id93086be1224b6f6bf0bdaa1d50b4f289099027e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133876 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-04Just use Any ctor instead of makeAny in starmathStephan Bergmann4-12/+12
Change-Id: I8264c2330837fbd46ea372a8e370bb43ca1fb7b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133775 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-03add o3tl::equalsAsciiNoel Grandin4-9/+10
Change-Id: I042b8dcadbf7581de325c161763fe35aecde5ca2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-01ofz#47162 Integer-overflowCaolán McNamara1-0/+6
Change-Id: I4d910a1844100415f95c89bda83843ddffdc3df0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133663 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-01use more string_view in variousNoel Grandin1-2/+3
found by examining uses of OUString::copy() for likely places Change-Id: I6ff20e7b273ad6005410b82719183c1122f8c018 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133617 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-30split comphelper::string::strip functions into String and view versionNoel Grandin2-2/+2
which is more obvious, from the perspective of the caller, and lets us avoid creating a new String if nothing needs to be stripped Change-Id: I66a980eaf4aa818251bec49bdb16c2dddb0745e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-27tdf#148819: let the scroller know the custom widget's line sizeMike Kaganski1-0/+2
Change-Id: Ie30cd1db182aad5fbbf7e89498bd0ae9ce98c0f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133518 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-27Clean up includesMike Kaganski1-2/+0
Change-Id: Ied9a75953875e809e4284fdff03aab6add6800ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133511 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-27tdf#125931: add Properties panel to Math's Properties deckMike Kaganski6-1/+228
For now, it only contains buttons opening the dialogs accessible from Format menu. This is enough for the initial implementation, and should later be changed to individual controls allowing to set the formula properties directly. Change-Id: Ia0e52915198ddb2648d13d577d55b367f178b1ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133508 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-26tdf#125931: Add Elements deck and Elements panel to Math's sidebarMike Kaganski7-0/+456
Change-Id: Ie04a5dc48de38f318f0ddb42efc42cea022dc62c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133393 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>