summaryrefslogtreecommitdiff
path: root/starmath/inc
AgeCommit message (Collapse)AuthorFilesLines
2023-10-07loplugin:ostr: automatic rewriteStephan Bergmann2-5/+5
Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2023-09-28starmath: Add Arabic functions to elements panelKhaled Hosny1-288/+313
Change-Id: I9aa1bdd344dbca078aec683b5fcd93fd07d98521 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157365 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-28starmath: Add Arabic functionsKhaled Hosny1-1/+2
Change-Id: Ie7597cbde29c8b9cd53d591dc9a722e7df76048b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157361 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-28tdf#142095: Render symbols in Math Symbols Catalogue using document settingsKhaled Hosny1-2/+4
Use the document format to resolve the font and style of the symbol. This makes the symbols use the current document font, as well as apply settings like GreekCharStyle. Change-Id: I668e582704b7e011e032f8b9e1dfb509e0d00d3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157348 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-28starmath: Arabic symbols from Symbols Catalogue should not be italicKhaled Hosny1-2/+0
Arabic math symbols are not set in italic, so we need to unset the italic style if set. Change-Id: Id6db51a944236722a9724ad0d128ff6435a6bac0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157346 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-21starmath: Rename SmSym::GetName() -> GetUiName()Khaled Hosny1-2/+2
To make it obvious this is the UI (localized) name. Change-Id: Id0dbffeaa9c331ce90dee3e7fbc88f93fab1b654 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157138 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-21tdf#62174: Fix saving of localized iGreek symbolsKhaled Hosny1-5/+3
When saving symbols we use the non-localized name, but iGreek symbols are a bit of a hack since they are added at runtime and don’t have localizations of there own but use the Greek symbols names with an “i” prefix. Instead of looking directly for localized names, we now go through the symbol manager that already knows about iGreek and use the export name of the symbol. We have to also make sure the iGreek symbols has non-localized export name. Change-Id: Ia3e38579abba56ae12ade126f564f8c6f9c3229a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157137 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-19starmath: Improve glyph positioningKhaled Hosny1-4/+4
Using twips everywhere and not rounding to pixels seems to improve positioning (at least on hipdi displays). Hopefully the issue that required rounding is no longer relevant. Change-Id: I0ee4a4453b2a3d8e06be56d586761f7960a2d4d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157044 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-19starmath: Get the font from current format for special symbolsKhaled Hosny1-1/+2
We want to use the current format when using the symbol in a document, and fallback for stabdard format when rendering the symbol in symbols dialog. Fixup for the following two commits: commit f28b043b4eb40e90b330721fc43d19ae6c06951e Author: Khaled Hosny <khaled@libreoffice.org> Date: Mon Sep 18 19:00:02 2023 +0300 starmath: Fix editing symbols in the Symbols Catalogue commit 32d2e001bb056e7d98aa143b222f2721967337dc Author: Khaled Hosny <khaled@libreoffice.org> Date: Tue Sep 12 18:35:46 2023 +0300 tdf#101174: Don’t hard-code OpenSymbol font for predefined special symbols Change-Id: Id3730749a49015120ecf9719027f932fd90c605a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157043 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-18starmath: Fix editing symbols in the Symbols CatalogueKhaled Hosny1-1/+1
Fallout from: commit 32d2e001bb056e7d98aa143b222f2721967337dc Author: Khaled Hosny <khaled@libreoffice.org> Date: Tue Sep 12 18:35:46 2023 +0300 tdf#101174: Don’t hard-code OpenSymbol font for predefined special symbols Change-Id: I1f440dccc920b24010160dbeee58795ffd8f85ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157025 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-18tdf#111705: Add the new maj and hadd operators to the elements panelKhaled Hosny2-0/+16
Change-Id: Ib62592d86a1bf2e5d94348fca731473dba92be74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156996 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-18tdf#111705: Add support of Persian limits operator (U+1EEF1)Khaled Hosny2-0/+2
Change-Id: I9936a206b2ce6c8d195967d1e14596c5903c1ef5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156995 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-18tdf#111705: Add support of Arabic summation operator (U+1EEF0)Khaled Hosny3-16/+20
Needed to fix a punch of code to work with UTF-16 not just UCS-2 (in other words, handle surrogate pairs). Change-Id: Idd7aa823349a032f20f37abbb588856afbc548d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156994 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-08tdf#88744: Use real clipboard when inline editing is enabledKhaled Hosny1-6/+4
Instead of using a fake clipboard that works only inside the same formula. Change-Id: Ia1e97028e1aafa15912bc9b4397d66afb0d23ec7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156671 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-07starmath: Properly update the state to copy/cut/paste buttonsKhaled Hosny2-1/+2
Invalidate the slots explicitly instead of implicitly by updating the edit window. Followup to: commit 065609f86f730d4eedc6b7ae28382dc7daea11ac Author: Khaled Hosny <khaled@libreoffice.org> Date: Mon Sep 4 13:22:04 2023 +0300 starmath: Make cut/copy/paste buttons work with inline editing Change-Id: If0648c249d6145475202e1a48364d7fe142a5e35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156674 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-05starmath: Always insert using SmCursor when inline editing is enabledKhaled Hosny1-14/+0
Choosing which code path based on which widget has focus is not a very good idea, and leads to unreliable UI tests as each code path inserts the text slightly differently (one code path inserts plain text then parses the whole equation again, while the other parses the new text then inserts the parsed node directly). Change-Id: Ib2ca942c537e466f6ff100be7f95adaead99f1d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156578 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-04starmath: Make cut/copy/paste buttons work with inline editingKhaled Hosny1-0/+1
Check for visual cursor selection when in inline editing mode, and update edit window when updating visual cursor. Change-Id: Id1a259b67db47eea0b36b55d08ef5dc5f8aa8246 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156513 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-04tdf#134193: Fix inline editing with RTL directionKhaled Hosny1-1/+1
Change-Id: I65d3ed0d7c56839ce3674318144269719b043ba5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156261 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-04tdf#134193: Support rendering math in RTL modeKhaled Hosny1-1/+6
Respect IsRightToLeft property and render accordingly. This also fixes math rendering in RTL UI, which was incorrectly rendered RTL. Change-Id: Id8520930f09a21daa1c70e40a765ac25572ea994 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155738 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-04tdf#134193: Add the ability to set RTL math directionKhaled Hosny2-0/+6
This adds a new IsRightToLeft document property, reads/writes it, and sets dir="rtl" on the top level MathML <math> element if set to true. Rendering will be handled in next commits. Change-Id: Ia3078b8a269fef7c3f037a2f1b7799744df2680b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155737 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-03starmath: Graduate inline (visual) editing from experimental featuresKhaled Hosny3-0/+4
It has been experimental for as long as LibreOffice existed, lets make it non-experimental but add an option to disable it. If it turns to be a disaster, we can flip the option and disable it by default. Change-Id: I63672c054d1ead269863079e7f9c118a44b3ba19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156486 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-31tdf#143213: Fix reading math font settings from fileKhaled Hosny1-0/+4
The order of reading the settings is significant, e.g. if font italic was read first then font name, font name would set a new font overriding the italic setting. We now collect all font settings and apply them at once. Change-Id: Idb32d7d416607011bc325eff0b73c03b2d12e7d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156352 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-29tdf#49895: Add search functionality to Options dialogBayram Çiçek1-0/+2
- Search field added. - Dialog names of all treeview nodes with their parent names were included in searching. - Strings of labels, check buttons, radio buttons, toggle buttons, link buttons and buttons were included in searching. Change-Id: Idf67c160519402ee390d94b1b3135b56324f3990 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152519 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-08-25tdf#101174: Add the ability to change math font in MathKhaled Hosny2-1/+2
The math font (default is OpenSymbol) can now be changed from the fonts dialog like other fonts (variables, numbers, etc). Change-Id: I57f416173abf7bef8bb66b5e5e393dd928e30652 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156053 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-26tdf#149888 Make F1 work in Math initial stateRafael Lima2-0/+4
Currently, when Math is opened and F1 is pressed in its initial state, no help page is opened. This is caused by the GrabFocus call in InitialFocusTimerHdl (see comments in its implementation). This patch ensures that pressing F1 both in the Edit and Graphics windows will open the main help page of the Math module. NOTE: This patch will only work after the related patch in helpcontent2 gets accepted, since it is responsible for creating the HID target in the XHP file. Change-Id: I59980cea1816a863e1aaa2d0757d9b141437ead5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154691 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2023-07-23vcl: Drop now unneeded DevicePoint typedefKhaled Hosny1-18/+29
It has been always typedef'd to basegfx::B2DPoint since: commit 5e218b5c51f7d9cd10bd9db832879efca41b9c75 Date: Wed Jan 12 21:19:32 2022 +0000 always use B2DPoint for DevicePoint Change-Id: I9f5202d5a71c77dd79f1759923917c26bf68a9af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154632 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-06-04Remove unused starmathdatabase::Identify_Color_HTMLJulien Nabet1-8/+0
Seems to be unused since 88c343b50a1de197394e3e22bf82ff455386a80b "Corrected my previous mess on mathml export with color export 2. Now only exports HTML4 colors and others are treated as #RRGGBB. Now mathml can import #RGB colors. " in 2020 Change-Id: Iac006383146afaa62775e6e76fa203925dce51d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152585 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2023-06-03Remove unused SmStructureNode::SetSubNodesBinMo with plain pointers (starmath)Julien Nabet1-10/+0
and keep the remaining one which uses unique_ptr Change-Id: I0e4e4aff5c202897a27dfef97750c14c3c5736bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152581 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-05-26use more TypedWhichIdNoel Grandin1-1/+2
Change-Id: Icc1cbd2717034c87bdaea1b62253b001243c6652 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152290 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-25use more TypedWhichIdNoel Grandin1-5/+5
Change-Id: I6c54c1276b36cbc71417486ffcee2ef9ef0cff7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-02Avoid conversions between OUString and OString in VCLMike Kaganski2-30/+30
Standardize on OUString, which is the main internal string class. Convert from/to OUString only when communicating with respective external APIs. Removes about 200 conversions from the code. Change-Id: I96ecee7c6fd271bb76639220e96d69d2964bed26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149930 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-27mpLocSymbolData is unusedNoel Grandin1-9/+5
and SmLocalizedSymbolData cannot even be instantiated. It is better off as a namespace, rather than a class. Change-Id: I4d6daace649e3529cefe67cf18eed85f2cbfc980 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147857 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-26no need to hold SvtSysLocale by std::unique_ptrNoel Grandin1-1/+2
allocate it inline, it is only one pointer in size Change-Id: I736f3322784897054993fbddd423f36357f817c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147741 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-16SfxViewShell::GetViewFrame never returns null, change to a referenceCaolán McNamara1-1/+1
various null checks can be seen to be redundant and removed Change-Id: Icf49c1de4b0302795d2769a370af3abceaad0221 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147147 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-16SfxViewShell never takes a null SfxViewFrame*Caolán McNamara1-1/+1
Change-Id: I36f3a5c77a7fb2d3cf267184e403e6cd24dbd70b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147112 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-01Resolves: tdf#152845 AutoText preview not readable in high contrast modeCaolán McNamara1-1/+2
if its a high contrast mode with white text on black background. Reuse isOutputToWindow to distinguish between the case we are outputting to screen but not using a vcl::Window (and want to use the appropiate color for autocolor) vs the cases we are printing or exporting to pdf and not using a vcl::Window where the color should be black. Change-Id: Ib688892a6315fe88ba585613539088611d3995ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145234 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-23use more concrete SmModel typeNoel Grandin3-7/+10
Change-Id: I7804e7201e64f419383e37b916b212ac9c129ef6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145984 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-14XUnoTunnel->dynamic_cast in SvXMLExportNoel Grandin2-8/+0
Change-Id: I68e4691ac0a58e2320b534d15934ff177feb124d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145493 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-14XUnoTunnel->dynamic_cast in SvXMLImportNoel Grandin2-8/+0
Change-Id: I070bc1a8136e5b492c0ea56774a274b9a3d2ec2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145494 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-12-18Combine oox::FormulaIm-/ExportBaseStephan Bergmann1-6/+3
The original classes were both only used as base classes of SmModel, and combining them will make it easier to replace the existing dynamic_casts to those classes with XUnoTunnel. (And see the upcoming commit introducing loplugin:unocast on why those dynamic_casts are dangerous.) Change-Id: I4b1e0594fb202e3423d57db6457aa0e1b1b0b612 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144353 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-14starmath: React to touchpad zoom gestures in SmGraphicWidgetPovilas Kanapickas1-0/+2
Change-Id: Id158d7778ec0c375c143cf9ce492af21b9625c9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143759 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-12-02tdf#151842: starmath_import: Add unittestXisco Fauli2-2/+4
Change-Id: Iaae4880324872786f956d112a71c4f0870853f90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143568 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-24loplugin:unusedfields make some fields privateNoel Grandin1-2/+0
this is one of the secondary analyses this plugin performs Change-Id: I022b9eda994acbd25714025b666194266e896640 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143215 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-05lok: show Math selectionMike Kaganski2-9/+19
Change-Id: I950ae3e5fb000d6acec4c26ff143b918a4e48a27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142342 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-05lok: show Math cursorMike Kaganski3-16/+55
Change-Id: I17a449f0a0662f0433de9cad1522a090434c1e30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142178 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-04lok: use twips in MathMike Kaganski1-0/+13
Change-Id: I11acd281da64b0023d74b3bc02e0f54864b94da9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142275 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-04Use o3tl::convert in MathMike Kaganski1-29/+0
... and use our standard definition of pt. Change-Id: I5a162b137360210335b84de33606dc7404cfc2de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142204 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-22loplugin:unusedmethodsNoel Grandin1-3/+0
Change-Id: I3c94d68cb85adc2005a5a5e3b03a311732f782c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141617 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-30use more string_view in starmathNoel Grandin1-1/+1
Change-Id: I3569d8dd41bf1c2db6a1fd379ca5596342922e45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140786 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-14move ErrCode to comphelper and improve debug output stringNoel Grandin3-3/+3
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>